From: Sage Weil Date: Mon, 10 Aug 2009 20:29:00 +0000 (-0700) Subject: kclient: GFP_NOFS for vmalloc; vmalloc large incoming msgs too X-Git-Tag: v0.13~99 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=86e631dd7d4e5b3d7bf4af104191ef43165fb9b8;p=ceph.git kclient: GFP_NOFS for vmalloc; vmalloc large incoming msgs too --- diff --git a/src/kernel/messenger.c b/src/kernel/messenger.c index 2e9b3c6f4567..a6c8e0a8f7f4 100644 --- a/src/kernel/messenger.c +++ b/src/kernel/messenger.c @@ -1432,7 +1432,15 @@ static int read_partial_message(struct ceph_connection *con) while (m->front.iov_len < front_len) { if (m->front.iov_base == NULL) { - m->front.iov_base = kmalloc(front_len, GFP_NOFS); + if (front_len > PAGE_CACHE_SIZE) { + m->front.iov_base = __vmalloc(front_len, + GFP_NOFS, + PAGE_KERNEL); + m->front_is_vmalloc = true; + } else { + m->front.iov_base = kmalloc(front_len, + GFP_NOFS); + } if (m->front.iov_base == NULL) return -ENOMEM; } @@ -2296,7 +2304,8 @@ struct ceph_msg *ceph_msg_new(int type, int front_len, /* front */ if (front_len) { if (front_len > PAGE_CACHE_SIZE) { - m->front.iov_base = vmalloc(front_len); + m->front.iov_base = __vmalloc(front_len, GFP_NOFS, + PAGE_KERNEL); m->front_is_vmalloc = true; } else { m->front.iov_base = kmalloc(front_len, GFP_NOFS);