From patchwork Tue Oct 24 13:46:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suren Baghdasaryan X-Patchwork-Id: 13434595 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9782BC07545 for ; Tue, 24 Oct 2023 13:48:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CD08A6B0286; Tue, 24 Oct 2023 09:47:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C59046B0287; Tue, 24 Oct 2023 09:47:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A32936B0288; Tue, 24 Oct 2023 09:47:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 89A596B0286 for ; Tue, 24 Oct 2023 09:47:42 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 666C8B5D89 for ; Tue, 24 Oct 2023 13:47:42 +0000 (UTC) X-FDA: 81380482764.01.F2DA27A Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) by imf29.hostedemail.com (Postfix) with ESMTP id 9F67612002F for ; Tue, 24 Oct 2023 13:47:40 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=U+pQ+mEh; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf29.hostedemail.com: domain of 3-8o3ZQYKCKASURENBGOOGLE.COMLINUX-MMKVACK.ORG@flex--surenb.bounces.google.com designates 209.85.219.202 as permitted sender) smtp.mailfrom=3-8o3ZQYKCKASURENBGOOGLE.COMLINUX-MMKVACK.ORG@flex--surenb.bounces.google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1698155260; a=rsa-sha256; cv=none; b=rWELcIBXTFsPi+VFzVlT8e83J0zBufgbBfj1BPKXVLIGi7gFK5b6eT38P+qYdnkfP8WvKv eDgmSr7vDuBZsxlv/Ccr28aslx8j3OvJtaADhUU5kxk7BrwqCqmei7e0Inik1VwRvVP6rj SlklrUMLD/Dcqjbh30XPy02m3luinF4= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=U+pQ+mEh; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf29.hostedemail.com: domain of 3-8o3ZQYKCKASURENBGOOGLE.COMLINUX-MMKVACK.ORG@flex--surenb.bounces.google.com designates 209.85.219.202 as permitted sender) smtp.mailfrom=3-8o3ZQYKCKASURENBGOOGLE.COMLINUX-MMKVACK.ORG@flex--surenb.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1698155260; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=2MflihaSbuQmiTaEEI/kjjxwB9AeuC8B0gJ477WMkrk=; b=xBXfM93SK9dPBgc6L89igpnrKbk3G7KINmgNGaAgzw0YJZ7qOJqXegY5ZNqzyFPtjfqbg2 kZAU1k2VzlKG9pOzBs8l3VL19Q/otTxhee9y6scBPX9UDXVMigWnRgduHL0QQ51qrNHesg WYoD9tlM77s5UOJx4fyTn4Fg0YCRHDI= Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-d9bc6447193so5058817276.3 for ; Tue, 24 Oct 2023 06:47:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1698155260; x=1698760060; darn=kvack.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=2MflihaSbuQmiTaEEI/kjjxwB9AeuC8B0gJ477WMkrk=; b=U+pQ+mEhMs01sCatKwa16gWy5GS0XeCZn6n6m848PJM8QW8GFOFlEjTKd0NQyZSjOh Btbh0ODYarmS9PJ6ERuU9SsXBO4xA/JkAelQSrUDqcJvSTLNNFUimeBylbST3wyZ4glR VG4Hxk9vIOVzCW61ZJLLq8KrEkrY/wBv2j9H2DH6CuiReKC21X0tQ7zu94M/v6fIKacv 2gV1mjl3DSJW/htPkkC7poybms0V+W1YA0yRUQjNnegzIGr1nz8cwmK+jY8StDnuR3Ui DbgDTxPlzQO8pEMUBOcCGAMSTXXHcMnOpbvg2Zmr/U6qqpfRCMe46IXvQhgdBapKOEGb jfxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698155260; x=1698760060; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2MflihaSbuQmiTaEEI/kjjxwB9AeuC8B0gJ477WMkrk=; b=WAEZUoPcOL4C4oPu21+ZL8xZacrW6vXJvjGlP0ejmAcD0sOQFngWtBTiZN0gZZxPIh B1SHkLi5RMQ4U5svuzJdb1Cr7cFU/uA74irvkJ6frApdcKOll6OGG5pNFusbg+m3WIff KTSLW89SUooqeEHti3xye/Ht517IppuZ6W+lKzOzStnCr+aLKlQvpjuQCfV/wCBCsX6c SZHaJQ6bEdvA6whenaQYCPstu1CCfTrSXhJ5/IGD5a9kNMNfL7go5jJyHWyeFsAU70Es +fZ7/rDipLlMrPxgg9CJLOoHiqby+U4adM7/R4wwis8nWxMn3zn7Xhq9KINVJUQ/Nxnj 0Rsw== X-Gm-Message-State: AOJu0YwJW/TvrPS3Ajki2dL2rjdZk+M+MK8x6GgW5sTxC5QOj+UjWNNf 4eW6YgLTDZ8yfqis74D4EdiBZvWGdh8= X-Google-Smtp-Source: AGHT+IEn9RJ/YYka9nhFwipeWEC4kTkdUXBs4fb0JEteWf5skbl81x+dboQnU840QIKuLVpVMJxwXpn7baA= X-Received: from surenb-desktop.mtv.corp.google.com ([2620:15c:211:201:45ba:3318:d7a5:336a]) (user=surenb job=sendgmr) by 2002:a5b:8c1:0:b0:da0:5452:29e4 with SMTP id w1-20020a5b08c1000000b00da0545229e4mr18077ybq.0.1698155259614; Tue, 24 Oct 2023 06:47:39 -0700 (PDT) Date: Tue, 24 Oct 2023 06:46:23 -0700 In-Reply-To: <20231024134637.3120277-1-surenb@google.com> Mime-Version: 1.0 References: <20231024134637.3120277-1-surenb@google.com> X-Mailer: git-send-email 2.42.0.758.gaed0368e0e-goog Message-ID: <20231024134637.3120277-27-surenb@google.com> Subject: [PATCH v2 26/39] mempool: Hook up to memory allocation profiling From: Suren Baghdasaryan To: akpm@linux-foundation.org Cc: kent.overstreet@linux.dev, mhocko@suse.com, vbabka@suse.cz, hannes@cmpxchg.org, roman.gushchin@linux.dev, mgorman@suse.de, dave@stgolabs.net, willy@infradead.org, liam.howlett@oracle.com, corbet@lwn.net, void@manifault.com, peterz@infradead.org, juri.lelli@redhat.com, ldufour@linux.ibm.com, catalin.marinas@arm.com, will@kernel.org, arnd@arndb.de, tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org, peterx@redhat.com, david@redhat.com, axboe@kernel.dk, mcgrof@kernel.org, masahiroy@kernel.org, nathan@kernel.org, dennis@kernel.org, tj@kernel.org, muchun.song@linux.dev, rppt@kernel.org, paulmck@kernel.org, pasha.tatashin@soleen.com, yosryahmed@google.com, yuzhao@google.com, dhowells@redhat.com, hughd@google.com, andreyknvl@gmail.com, keescook@chromium.org, ndesaulniers@google.com, vvvvvv@google.com, gregkh@linuxfoundation.org, ebiggers@google.com, ytcoode@gmail.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, bristot@redhat.com, vschneid@redhat.com, cl@linux.com, penberg@kernel.org, iamjoonsoo.kim@lge.com, 42.hyeyoo@gmail.com, glider@google.com, elver@google.com, dvyukov@google.com, shakeelb@google.com, songmuchun@bytedance.com, jbaron@akamai.com, rientjes@google.com, minchan@google.com, kaleshsingh@google.com, surenb@google.com, kernel-team@android.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, linux-arch@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-modules@vger.kernel.org, kasan-dev@googlegroups.com, cgroups@vger.kernel.org X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 9F67612002F X-Stat-Signature: js8788k3fy9t8beuaddip46dcgy5mfzx X-HE-Tag: 1698155260-986323 X-HE-Meta: U2FsdGVkX1/dmC0wksog7JvZUYlqPXPfkJz3oPHsOMORqq3dFYwb8Cf4AeMwg8ffSdIm3DUxJLaUaqv/c0YvSI6VlL47+zzrHOXDzQRkralIezoXuoxicaxtFqLL3qn4sa9eOEziPaLw9vRHT4QnU7JBCD/Nh/WhwAyVrzs+0Z1k9UxFGvIPZIlvri/TOErU4BDpW0VSQW8/NpKPwKM9+5WQeyek4nzd7dci4kOd4nu+AnEB7iO18S30l3NrKhqFVsqGHz15FPtlirzuMOnC1rCSEvbgUToWwWDy7TrL868EDHoMGzwD9qAevuEv9sajTzl1yQUyaX9RV3/kF+FtuGkYYuDQgQ2LDeoSIRj0wbGfdTK6Q33ytkKPhWN0d9jH9tPrbry1lvuOIcBKy68Z17g8I2qeFqgTSppfsjUugjT2UTcCK8LWoFpe5SXMiTghlbWV3BHpGoAPYk6ozRfCWi1n4/uai0iQGCbZPZTTChh6hAimigRHnilDsSeFMWh3NrBMSqDlL1ZZXgKgDdpSoMul0ujJyaYeZEbqyZEYvWe1e/PEobfgTn8nDkvW28KHBvjH9TxPOyegJUzVhnPVjRCeB7R631YvYE3oY0NKvNTH/5WUUvHF9v5POPgpmFcISTLcRp0Yqvi37yirQqc9EKUi5+rqilrs2sJJTNohL+uBigxLBcHozCV/anUM74euBvoQTn3NVfwQFNZT9T5rKGyt8LihLBf98Dj3m9bTq/ExLiXweY/TJ6z+bmHn8RppRp3HALbgoZkoWAXFQ49SlVpO83SQgFDBRy1UHXuBmEa0tCVcPkPD0Cjr/I3IDfqxVIxaWcn5EVGoNwfay669qyh4ba21FVvm5VR1mCEB3xjjJC0sZKG2IkvfyJAJvaAeVg8kLxH2p7S8m1VSAKLrhxbyWnPsqIO8tBNpzEqZ1lere0E/jDVuOOX2IqliGiZXK783D4dDiNybDsSdGNF wRnGPJRC f+OcWOtr6j7nZyvf8PkfSiGFUEX2LaOSTYSvNzEej1XAJ6f1q+DGOWCeF2EMLfE4Eq4QveuyKAcGEIknS3YT79DFgA9wva99SJ6kYa0XyqcqPCyd2zB/VRUyixkCflVPEezlYhA7TXXFHztg0aS354NQOXhm1Fyb18cflyz73yN6YWg/iCQ0I+fWtiPC2xvLkgi2OLQxAnvqVtt8MHotbRmIxsM6f5jYoWnMVOJQpv35Fd3LjLJmrDIiGyzYPKEUpLu1daL3WyFi0nf2mI1fAuKj4QeUcB9Vl405KsT+A0WVGmViT+hvEuEqlGMpTwjO9qbRoQ/Gn6q6gmUIFtvwY1z2qFmi44MevJUvGWMKprjXFy9D101QTPgQBwpEDKYwqGth1DyXiiHBQU3FaOmJtnnr0VrMd4RT3mh4e0qZm8lXjebx7+NwUqWi0ygn6fZPtHeBtZTS50BewZkTh1vKRw12U+q6urEd6VlzfoG235X4Gjt2tpCNFEarfshT7YmZq44wUAeN7YeEuk3TANjks80xo3clXEvbiFLmQ3/6fm0x1vRYnhjzuS8eRzIjVk70fbzT5s5I5D7s133Ev+LJGcl3SoypSVtqfPIJ+gddYeH1MJnZy2MOmJJ5VdV0REYNXXnlms7R97Ub3fJ2zsw6soKrqFWFBUOn/X4uw X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: From: Kent Overstreet This adds hooks to mempools for correctly annotating mempool-backed allocations at the correct source line, so they show up correctly in /sys/kernel/debug/allocations. Various inline functions are converted to wrappers so that we can invoke alloc_hooks() in fewer places. Signed-off-by: Kent Overstreet Signed-off-by: Suren Baghdasaryan --- include/linux/mempool.h | 73 ++++++++++++++++++++--------------------- mm/mempool.c | 34 ++++++++----------- 2 files changed, 48 insertions(+), 59 deletions(-) diff --git a/include/linux/mempool.h b/include/linux/mempool.h index 4aae6c06c5f2..9fa126aa19b5 100644 --- a/include/linux/mempool.h +++ b/include/linux/mempool.h @@ -5,6 +5,8 @@ #ifndef _LINUX_MEMPOOL_H #define _LINUX_MEMPOOL_H +#include +#include #include #include @@ -39,18 +41,32 @@ void mempool_exit(mempool_t *pool); int mempool_init_node(mempool_t *pool, int min_nr, mempool_alloc_t *alloc_fn, mempool_free_t *free_fn, void *pool_data, gfp_t gfp_mask, int node_id); -int mempool_init(mempool_t *pool, int min_nr, mempool_alloc_t *alloc_fn, + +int mempool_init_noprof(mempool_t *pool, int min_nr, mempool_alloc_t *alloc_fn, mempool_free_t *free_fn, void *pool_data); +#define mempool_init(...) \ + alloc_hooks(mempool_init_noprof(__VA_ARGS__)) extern mempool_t *mempool_create(int min_nr, mempool_alloc_t *alloc_fn, mempool_free_t *free_fn, void *pool_data); -extern mempool_t *mempool_create_node(int min_nr, mempool_alloc_t *alloc_fn, + +extern mempool_t *mempool_create_node_noprof(int min_nr, mempool_alloc_t *alloc_fn, mempool_free_t *free_fn, void *pool_data, gfp_t gfp_mask, int nid); +#define mempool_create_node(...) \ + alloc_hooks(mempool_create_node_noprof(__VA_ARGS__)) + +#define mempool_create(_min_nr, _alloc_fn, _free_fn, _pool_data) \ + mempool_create_node(_min_nr, _alloc_fn, _free_fn, _pool_data, \ + GFP_KERNEL, NUMA_NO_NODE) extern int mempool_resize(mempool_t *pool, int new_min_nr); extern void mempool_destroy(mempool_t *pool); -extern void *mempool_alloc(mempool_t *pool, gfp_t gfp_mask) __malloc; + +extern void *mempool_alloc_noprof(mempool_t *pool, gfp_t gfp_mask) __malloc; +#define mempool_alloc(...) \ + alloc_hooks(mempool_alloc_noprof(__VA_ARGS__)) + extern void mempool_free(void *element, mempool_t *pool); /* @@ -61,19 +77,10 @@ extern void mempool_free(void *element, mempool_t *pool); void *mempool_alloc_slab(gfp_t gfp_mask, void *pool_data); void mempool_free_slab(void *element, void *pool_data); -static inline int -mempool_init_slab_pool(mempool_t *pool, int min_nr, struct kmem_cache *kc) -{ - return mempool_init(pool, min_nr, mempool_alloc_slab, - mempool_free_slab, (void *) kc); -} - -static inline mempool_t * -mempool_create_slab_pool(int min_nr, struct kmem_cache *kc) -{ - return mempool_create(min_nr, mempool_alloc_slab, mempool_free_slab, - (void *) kc); -} +#define mempool_init_slab_pool(_pool, _min_nr, _kc) \ + mempool_init(_pool, (_min_nr), mempool_alloc_slab, mempool_free_slab, (void *)(_kc)) +#define mempool_create_slab_pool(_min_nr, _kc) \ + mempool_create((_min_nr), mempool_alloc_slab, mempool_free_slab, (void *)(_kc)) /* * a mempool_alloc_t and a mempool_free_t to kmalloc and kfree the @@ -82,17 +89,12 @@ mempool_create_slab_pool(int min_nr, struct kmem_cache *kc) void *mempool_kmalloc(gfp_t gfp_mask, void *pool_data); void mempool_kfree(void *element, void *pool_data); -static inline int mempool_init_kmalloc_pool(mempool_t *pool, int min_nr, size_t size) -{ - return mempool_init(pool, min_nr, mempool_kmalloc, - mempool_kfree, (void *) size); -} - -static inline mempool_t *mempool_create_kmalloc_pool(int min_nr, size_t size) -{ - return mempool_create(min_nr, mempool_kmalloc, mempool_kfree, - (void *) size); -} +#define mempool_init_kmalloc_pool(_pool, _min_nr, _size) \ + mempool_init(_pool, (_min_nr), mempool_kmalloc, mempool_kfree, \ + (void *)(unsigned long)(_size)) +#define mempool_create_kmalloc_pool(_min_nr, _size) \ + mempool_create((_min_nr), mempool_kmalloc, mempool_kfree, \ + (void *)(unsigned long)(_size)) /* * A mempool_alloc_t and mempool_free_t for a simple page allocator that @@ -101,16 +103,11 @@ static inline mempool_t *mempool_create_kmalloc_pool(int min_nr, size_t size) void *mempool_alloc_pages(gfp_t gfp_mask, void *pool_data); void mempool_free_pages(void *element, void *pool_data); -static inline int mempool_init_page_pool(mempool_t *pool, int min_nr, int order) -{ - return mempool_init(pool, min_nr, mempool_alloc_pages, - mempool_free_pages, (void *)(long)order); -} - -static inline mempool_t *mempool_create_page_pool(int min_nr, int order) -{ - return mempool_create(min_nr, mempool_alloc_pages, mempool_free_pages, - (void *)(long)order); -} +#define mempool_init_page_pool(_pool, _min_nr, _order) \ + mempool_init(_pool, (_min_nr), mempool_alloc_pages, \ + mempool_free_pages, (void *)(long)(_order)) +#define mempool_create_page_pool(_min_nr, _order) \ + mempool_create((_min_nr), mempool_alloc_pages, \ + mempool_free_pages, (void *)(long)(_order)) #endif /* _LINUX_MEMPOOL_H */ diff --git a/mm/mempool.c b/mm/mempool.c index 734bcf5afbb7..4fd949178449 100644 --- a/mm/mempool.c +++ b/mm/mempool.c @@ -230,17 +230,17 @@ EXPORT_SYMBOL(mempool_init_node); * * Return: %0 on success, negative error code otherwise. */ -int mempool_init(mempool_t *pool, int min_nr, mempool_alloc_t *alloc_fn, - mempool_free_t *free_fn, void *pool_data) +int mempool_init_noprof(mempool_t *pool, int min_nr, mempool_alloc_t *alloc_fn, + mempool_free_t *free_fn, void *pool_data) { return mempool_init_node(pool, min_nr, alloc_fn, free_fn, pool_data, GFP_KERNEL, NUMA_NO_NODE); } -EXPORT_SYMBOL(mempool_init); +EXPORT_SYMBOL(mempool_init_noprof); /** - * mempool_create - create a memory pool + * mempool_create_node - create a memory pool * @min_nr: the minimum number of elements guaranteed to be * allocated for this pool. * @alloc_fn: user-defined element-allocation function. @@ -255,17 +255,9 @@ EXPORT_SYMBOL(mempool_init); * * Return: pointer to the created memory pool object or %NULL on error. */ -mempool_t *mempool_create(int min_nr, mempool_alloc_t *alloc_fn, - mempool_free_t *free_fn, void *pool_data) -{ - return mempool_create_node(min_nr, alloc_fn, free_fn, pool_data, - GFP_KERNEL, NUMA_NO_NODE); -} -EXPORT_SYMBOL(mempool_create); - -mempool_t *mempool_create_node(int min_nr, mempool_alloc_t *alloc_fn, - mempool_free_t *free_fn, void *pool_data, - gfp_t gfp_mask, int node_id) +mempool_t *mempool_create_node_noprof(int min_nr, mempool_alloc_t *alloc_fn, + mempool_free_t *free_fn, void *pool_data, + gfp_t gfp_mask, int node_id) { mempool_t *pool; @@ -281,7 +273,7 @@ mempool_t *mempool_create_node(int min_nr, mempool_alloc_t *alloc_fn, return pool; } -EXPORT_SYMBOL(mempool_create_node); +EXPORT_SYMBOL(mempool_create_node_noprof); /** * mempool_resize - resize an existing memory pool @@ -377,7 +369,7 @@ EXPORT_SYMBOL(mempool_resize); * * Return: pointer to the allocated element or %NULL on error. */ -void *mempool_alloc(mempool_t *pool, gfp_t gfp_mask) +void *mempool_alloc_noprof(mempool_t *pool, gfp_t gfp_mask) { void *element; unsigned long flags; @@ -444,7 +436,7 @@ void *mempool_alloc(mempool_t *pool, gfp_t gfp_mask) finish_wait(&pool->wait, &wait); goto repeat_alloc; } -EXPORT_SYMBOL(mempool_alloc); +EXPORT_SYMBOL(mempool_alloc_noprof); /** * mempool_free - return an element to the pool. @@ -515,7 +507,7 @@ void *mempool_alloc_slab(gfp_t gfp_mask, void *pool_data) { struct kmem_cache *mem = pool_data; VM_BUG_ON(mem->ctor); - return kmem_cache_alloc(mem, gfp_mask); + return kmem_cache_alloc_noprof(mem, gfp_mask); } EXPORT_SYMBOL(mempool_alloc_slab); @@ -533,7 +525,7 @@ EXPORT_SYMBOL(mempool_free_slab); void *mempool_kmalloc(gfp_t gfp_mask, void *pool_data) { size_t size = (size_t)pool_data; - return kmalloc(size, gfp_mask); + return kmalloc_noprof(size, gfp_mask); } EXPORT_SYMBOL(mempool_kmalloc); @@ -550,7 +542,7 @@ EXPORT_SYMBOL(mempool_kfree); void *mempool_alloc_pages(gfp_t gfp_mask, void *pool_data) { int order = (int)(long)pool_data; - return alloc_pages(gfp_mask, order); + return alloc_pages_noprof(gfp_mask, order); } EXPORT_SYMBOL(mempool_alloc_pages);