]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: make message stream flush optional
authorSage Weil <sage@newdream.net>
Mon, 16 Mar 2009 22:46:40 +0000 (15:46 -0700)
committerSage Weil <sage@newdream.net>
Mon, 16 Mar 2009 22:51:36 +0000 (15:51 -0700)
If we know another message is following, or the current message
isn't time sensitive, then we can let Nagle's algo do it's thing.

src/kernel/messenger.c
src/kernel/messenger.h

index 89d72897fa632e2a8541c034d423a6379284329b..da2ec3a030df14d6b0b65b4d5299af8d697158af 100644 (file)
@@ -705,6 +705,7 @@ static void prepare_write_message(struct ceph_connection *con)
        } else {
                /* no, queue up footer too and be done */
                prepare_write_message_footer(con, v);
+               con->out_more = con->out_msg->more_to_follow;
        }
 
        set_bit(WRITE_PENDING, &con->state);
@@ -2314,6 +2315,7 @@ struct ceph_msg *ceph_msg_new(int type, int front_len,
        m->footer.front_crc = 0;
        m->footer.data_crc = 0;
        m->front_is_vmalloc = false;
+       m->more_to_follow = false;
 
        /* front */
        if (front_len) {
index a13a6d196b977e492cc965787a7020e100aa55a1..4bfccf1066f17b915cac8ed5f207ed9cff2ae6eb 100644 (file)
@@ -117,6 +117,7 @@ struct ceph_msg {
        struct list_head list_head;
        atomic_t nref;
        bool front_is_vmalloc;
+       bool more_to_follow;
 };
 
 struct ceph_msg_pos {