]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: remove msgpools for now
authorSage Weil <sage@newdream.net>
Tue, 8 Sep 2009 21:40:59 +0000 (14:40 -0700)
committerSage Weil <sage@newdream.net>
Tue, 8 Sep 2009 21:40:59 +0000 (14:40 -0700)
src/kernel/Makefile
src/kernel/import_patch_set_into_linux_git.sh
src/kernel/messenger.c
src/kernel/messenger.h
src/kernel/mon_client.c
src/kernel/super.c
src/kernel/super.h

index 031b85f96f9f54df59747c9384ff8b7b3fcbe6f7..ba1e6a59f651a4b5528d2c9cf99ab94f29a42ea6 100644 (file)
@@ -8,7 +8,7 @@ obj-$(CONFIG_CEPH_FS) += ceph.o
 
 ceph-objs := super.o inode.o dir.o file.o addr.o ioctl.o \
        export.o caps.o snap.o \
-       messenger.o msgpool.o \
+       messenger.o \
        mds_client.o mdsmap.o \
        mon_client.o \
        osd_client.o osdmap.o crush/crush.o crush/mapper.o \
index d55e5a58f0a88112f87230c6d771ca51c1a1cc9c..55e9b3600f8865e97bfe501f296dbfa1cfa39290 100755 (executable)
@@ -298,24 +298,12 @@ ceph: messenger library
 A generic message passing library is used to communicate with all
 other components in the Ceph file system.  The messenger library
 provides ordered, reliable delivery of messages between two nodes in
-the system, or notifies the higher layer when it is unable to do so.
+the system.
 
 This implementation is based on TCP.
 
 EOF
 
-git add $target/ceph/msgpool.h
-git add $target/ceph/msgpool.c
-git commit -s -F - <<EOF
-ceph: message pools
-
-The msgpool is a basic mempool_t-like structure to preallocate
-messages we expect to receive over the wire.  This ensures we have the
-necessary memory preallocated to process replies to requests, or to
-process unsolicited messages from various servers.
-
-EOF
-
 git add $target/ceph/export.c
 git commit -s -F - <<EOF
 ceph: nfs re-export support
index b60726388f08ae1eb3a0763c05d79b3d98ee2a08..9d69e46fc0ba403dc02f0fc5c6766b6b6cf9734c 100644 (file)
@@ -1689,7 +1689,6 @@ struct ceph_msg *ceph_msg_new(int type, int front_len,
        m->front_max = front_len;
        m->front_is_vmalloc = false;
        m->more_to_follow = false;
-       m->pool = NULL;
 
        /* front */
        if (front_len) {
@@ -1811,9 +1810,6 @@ void ceph_msg_put(struct ceph_msg *m)
                m->nr_pages = 0;
                m->pages = NULL;
 
-               if (m->pool)
-                       ceph_msgpool_put(m->pool, m);
-               else
-                       ceph_msg_kfree(m);
+               ceph_msg_kfree(m);
        }
 }
index ed675f5d9a84cf0d41e173f0cd52e8b73f67f595..5a965add550f5397b40f289f0b88d74da28b40a5 100644 (file)
@@ -101,8 +101,6 @@ struct ceph_msg {
        bool front_is_vmalloc;
        bool more_to_follow;
        int front_max;
-
-       struct ceph_msg_pool *pool;
 };
 
 struct ceph_msg_pos {
index d6b52a7fbb7fb1643de49811a8840e61a9a2c3b8..521c0366b255f1eb0b00a3041cd8dd87d9fae8ee 100644 (file)
@@ -453,7 +453,6 @@ int ceph_monc_do_statfs(struct ceph_mon_client *monc, struct ceph_statfs *buf)
                return -ENOMEM;
        }
        monc->num_statfs_requests++;
-       ceph_msgpool_resv(&monc->client->msgpool_statfs_reply, 1);
        mutex_unlock(&monc->mutex);
 
        /* send request and wait */
@@ -464,7 +463,6 @@ int ceph_monc_do_statfs(struct ceph_mon_client *monc, struct ceph_statfs *buf)
        mutex_lock(&monc->mutex);
        radix_tree_delete(&monc->statfs_request_tree, req.tid);
        monc->num_statfs_requests--;
-       ceph_msgpool_resv(&monc->client->msgpool_statfs_reply, -1);
        mutex_unlock(&monc->mutex);
 
        if (!err)
index 9378abbfd3015fb9cbb260b1e75a8a6ebb788094..386ea2838b2b1191f6f620839ec357400bc5e36e 100644 (file)
@@ -613,12 +613,6 @@ static struct ceph_client *ceph_create_client(void)
        if (client->trunc_wq == NULL)
                goto fail;
 
-       /* msg pools */
-       /* preallocated at request time: */
-       err = ceph_msgpool_init(&client->msgpool_statfs_reply, 4096, 0, false);
-       if (err < 0)
-               goto fail;
-
        /* subsystems */
        err = ceph_monc_init(&client->monc, client);
        if (err < 0)
@@ -656,9 +650,6 @@ static void ceph_destroy_client(struct ceph_client *client)
        if (client->wb_pagevec_pool)
                mempool_destroy(client->wb_pagevec_pool);
 
-       /* msg pools */
-       ceph_msgpool_destroy(&client->msgpool_statfs_reply);
-
        release_mount_args(&client->mount_args);
 
        kfree(client);
index 8b8992dd8477711d0667d6ea01e289a386ea1dd5..73540d053d09a3021485b874f70f184d1f1c068d 100644 (file)
@@ -13,7 +13,6 @@
 #include "types.h"
 #include "ceph_debug.h"
 #include "messenger.h"
-#include "msgpool.h"
 #include "mon_client.h"
 #include "mds_client.h"
 #include "osd_client.h"
@@ -133,9 +132,6 @@ struct ceph_client {
        struct ceph_mds_client mdsc;
        struct ceph_osd_client osdc;
 
-       /* msg pools */
-       struct ceph_msg_pool msgpool_statfs_reply;
-
        /* writeback */
        mempool_t *wb_pagevec_pool;
        struct workqueue_struct *wb_wq;