From patchwork Fri Jan 26 22:07:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 13533387 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 BBA49C47DDB for ; Fri, 26 Jan 2024 22:08:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1E4656B0096; Fri, 26 Jan 2024 17:08:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 193B26B0098; Fri, 26 Jan 2024 17:08:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0842C6B0099; Fri, 26 Jan 2024 17:08:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id E91D96B0098 for ; Fri, 26 Jan 2024 17:08:09 -0500 (EST) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id B66E91A0FCA for ; Fri, 26 Jan 2024 22:08:09 +0000 (UTC) X-FDA: 81722851098.24.924A4CE Received: from out-182.mta0.migadu.com (out-182.mta0.migadu.com [91.218.175.182]) by imf25.hostedemail.com (Postfix) with ESMTP id EDC63A000C for ; Fri, 26 Jan 2024 22:08:06 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=HiaE8sSD; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf25.hostedemail.com: domain of kent.overstreet@linux.dev designates 91.218.175.182 as permitted sender) smtp.mailfrom=kent.overstreet@linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1706306887; 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-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=hUkCrxHZnuGUOf1eWli04G60P3ry1f7NLrQ01CZWHvU=; b=0+hr1vAl1ZT76MBUsGJpx82WUTO91fHcq8H+zo761zzefjCEDKYB7xYLWJmcurr4G3I/ma X5eiUvnefJevTQFz8XcL4B4ULYwdNTlPHpO53H6OeXNDxHw0yVgOjTBQzUY6qL5+n0donB yVPIBYQtdXFQhxaPOntXxYDnEXR0pRc= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=HiaE8sSD; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf25.hostedemail.com: domain of kent.overstreet@linux.dev designates 91.218.175.182 as permitted sender) smtp.mailfrom=kent.overstreet@linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706306887; a=rsa-sha256; cv=none; b=qfAhOH6o0qZ2Ph97BZYPekIIjT7pMU81wBNFCV2FuwCbjViUUiDzg9rtA8LL8RzlPILm13 mUayfpjINzOoBv/dNIKqNgnDyxopJfVND47wPRtbSpVW+phm37hWvi+xs6zBgZUsCs2luJ iyLALcFPJKNVGVA0b5x2Xc3zdFcQd7g= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1706306884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=hUkCrxHZnuGUOf1eWli04G60P3ry1f7NLrQ01CZWHvU=; b=HiaE8sSDXRpZ4TySRs0B766b2V1BZSQn0nBnuW3qDOkFUgDWFumKJxcuU/mINuNeUxPqEG jbtvS60Lxx4mGTZqCwddyILH5BKtoiwGx65wAu76T2pBdyJ4Nz2Jveskq8nhLfA4pTty6i yrt/P+YllfrixgPOGJyk1Eas7Sxqsts= From: Kent Overstreet To: linux-mm@kvack.org Cc: Kent Overstreet , Vlastimil Babka , Matthew Wilcox , Michal Hocko , "Darrick J . Wong" Subject: [PATCH 1/2] mm: introduce memalloc_flags_{save,restore} Date: Fri, 26 Jan 2024 17:07:55 -0500 Message-ID: <20240126220756.395187-1-kent.overstreet@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: EDC63A000C X-Stat-Signature: dzc6bj79r8hmw4hfnkph794ac9ekrphh X-Rspam-User: X-HE-Tag: 1706306886-483468 X-HE-Meta: U2FsdGVkX1+tjy7elD//1PUhOvHKaW8NnzVWyiiTVNVEWjQg7kvmjv0RZntjRooM/ymnGgBB/HY58TzKMRuD4b/+g3GKmGxS0HF2bm7ZRVzGFVpfqHspOXxMRT9MoHzG5gK19So8COLmUrtckrmxxUXAZM8nIWrb+2Ij4GjRtxp7gy61bL3Ree3XAEI9Oyy9dJ9GUv4HAUBgQ+2c7qIyyYW3FWs79ULCzJ0MaZQbjcLS/zOxYbmwzE07J0iGto1IxYeMUjIZk4DHpegpsYGhqvd9oPjTIk8KX5czeIHGoAffNxRNX4qgp1wNdoHoR9SwSnk1H66yxID/hpZTmQdXrj7NcK1LbPME4wTUk52pl9P3CO0u1hlL3wb7UaPtIn02ecyMk8YMMtLNsqQaDsq60UfAMW4UiqIbfSSS0BdFNv66mG72qtv1C4/vBnrgD94dNBq/5qb4QR2Gk24tRwIFStTDksJLmuBzUPvjoZT3HnKAmg018wsJ8znlwAPfpW0uA2F3jH5fMyuBkfPJe0Zo2Kpb6pW47Hh7wYyVeZaTSYwrXuktmfNMpoLJXlSM/XNv082cM2B4Ei0xTDqrhm1jklec8ZG4Q0KnB2R8pX+GLY6KpOaytBNXgdAgJ7RlWqhH9+SnSaUdy/foF9hinBed4Days5uzDpI2Gv93lJQlrJyM6SgxFYSYDqYhjPEWlamHCERyrVQMjFp9TWumtZgOoyER1rPfOtp6R3EZ2kSNL1vNnnhwYe8AyD+tDE/5X763SMTpBJv42d2DvOCGLa76ddYDVeBmOZeeNqC4074OgVgAnnp1fNIaml0K688MrqNBcs8nruUHzWvHAoE2S9FNSjxxRs6QNGPrCoqSGJtPCi5lN4E4y6tb7Q2V11YwAQ/nBmzbyc2PvxlCLsdbnbcezCHWmLKh1rsZWL071288BX5gOHOqMID2kKqT8GTOjgIzrRXFdIMJzNObxmm1d1t k5YvnIGW B66ou3HPna5v6JN0S5H70NxY86LHBSf4LfHprqOr9+HY+D5+2pw9P9KaCZeFIOsiHicNo1t/hCgWGiCQt59fmoOedpkU8Ok8lCywnYQv26jVAWmhCREBAQdMaMK5QhCA32jL+CCvkUl220r6oUvNhg/Twl8PR3GOxAoRmL/FWiKs0BKpWUJVZDG9muXEX+8IURzPg6+06M1NdKX2hMiqAYvAGW4Z9MtD1hUsaGl9BGZpbYYU1dqVbcgPaXA== 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: Our proliferation of memalloc_*_{save,restore} APIs is getting a bit silly, this adds a generic version and converts the existing save/restore functions to wrappers. Signed-off-by: Kent Overstreet Cc: Vlastimil Babka Cc: Matthew Wilcox Cc: Michal Hocko Cc: Darrick J. Wong --- include/linux/sched/mm.h | 43 ++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/include/linux/sched/mm.h b/include/linux/sched/mm.h index 9a19f1b42f64..f00d7ecc2adf 100644 --- a/include/linux/sched/mm.h +++ b/include/linux/sched/mm.h @@ -306,6 +306,24 @@ static inline void might_alloc(gfp_t gfp_mask) might_sleep_if(gfpflags_allow_blocking(gfp_mask)); } +/** + * memalloc_flags_save - Add a PF_* flag to current->flags, save old value + * + * This allows PF_* flags to be conveniently added, irrespective of current + * value, and then the old version restored with memalloc_flags_restore(). + */ +static inline unsigned memalloc_flags_save(unsigned flags) +{ + unsigned oldflags = ~current->flags & flags; + current->flags |= flags; + return oldflags; +} + +static inline void memalloc_flags_restore(unsigned flags) +{ + current->flags &= ~flags; +} + /** * memalloc_noio_save - Marks implicit GFP_NOIO allocation scope. * @@ -319,9 +337,7 @@ static inline void might_alloc(gfp_t gfp_mask) */ static inline unsigned int memalloc_noio_save(void) { - unsigned int flags = current->flags & PF_MEMALLOC_NOIO; - current->flags |= PF_MEMALLOC_NOIO; - return flags; + return memalloc_flags_save(PF_MEMALLOC_NOIO); } /** @@ -334,7 +350,7 @@ static inline unsigned int memalloc_noio_save(void) */ static inline void memalloc_noio_restore(unsigned int flags) { - current->flags = (current->flags & ~PF_MEMALLOC_NOIO) | flags; + memalloc_flags_restore(flags); } /** @@ -350,9 +366,7 @@ static inline void memalloc_noio_restore(unsigned int flags) */ static inline unsigned int memalloc_nofs_save(void) { - unsigned int flags = current->flags & PF_MEMALLOC_NOFS; - current->flags |= PF_MEMALLOC_NOFS; - return flags; + return memalloc_flags_save(PF_MEMALLOC_NOFS); } /** @@ -365,32 +379,27 @@ static inline unsigned int memalloc_nofs_save(void) */ static inline void memalloc_nofs_restore(unsigned int flags) { - current->flags = (current->flags & ~PF_MEMALLOC_NOFS) | flags; + memalloc_flags_restore(flags); } static inline unsigned int memalloc_noreclaim_save(void) { - unsigned int flags = current->flags & PF_MEMALLOC; - current->flags |= PF_MEMALLOC; - return flags; + return memalloc_flags_save(PF_MEMALLOC); } static inline void memalloc_noreclaim_restore(unsigned int flags) { - current->flags = (current->flags & ~PF_MEMALLOC) | flags; + memalloc_flags_restore(flags); } static inline unsigned int memalloc_pin_save(void) { - unsigned int flags = current->flags & PF_MEMALLOC_PIN; - - current->flags |= PF_MEMALLOC_PIN; - return flags; + return memalloc_flags_save(PF_MEMALLOC_PIN); } static inline void memalloc_pin_restore(unsigned int flags) { - current->flags = (current->flags & ~PF_MEMALLOC_PIN) | flags; + memalloc_flags_restore(flags); } #ifdef CONFIG_MEMCG From patchwork Fri Jan 26 22:07:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 13533386 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 9115CC47422 for ; Fri, 26 Jan 2024 22:08:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D077D6B0095; Fri, 26 Jan 2024 17:08:09 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CB7856B0096; Fri, 26 Jan 2024 17:08:09 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BA6BB6B0098; Fri, 26 Jan 2024 17:08:09 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id A88346B0095 for ; Fri, 26 Jan 2024 17:08:09 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id D336880ED1 for ; Fri, 26 Jan 2024 22:08:08 +0000 (UTC) X-FDA: 81722851056.01.B56C8F8 Received: from out-187.mta0.migadu.com (out-187.mta0.migadu.com [91.218.175.187]) by imf10.hostedemail.com (Postfix) with ESMTP id 279A0C0016 for ; Fri, 26 Jan 2024 22:08:06 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=UZ5p9YY3; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf10.hostedemail.com: domain of kent.overstreet@linux.dev designates 91.218.175.187 as permitted sender) smtp.mailfrom=kent.overstreet@linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1706306887; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=YczcxWdjrPt2wQaIPeH9YyG5ctLXO/Bap0odgRcP4+A=; b=Yq6pVwr+Opa4aJcK/TmO7cRTigedt0WSAxbkJxUtViOjOSg083mEQGoqwWYxG6rSs14HWw FnSQMgc80JhzfY9mJKnMsu3/5OYD2KnlSAZHSf4VZj+JcQTbrPBAhy/pAj+9zIuHK7Yk5p S4jFYBTSyUAvE+jknwWmN18+msIfpS0= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=UZ5p9YY3; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf10.hostedemail.com: domain of kent.overstreet@linux.dev designates 91.218.175.187 as permitted sender) smtp.mailfrom=kent.overstreet@linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706306887; a=rsa-sha256; cv=none; b=75R8gfG7I2Kz1gMrwreBvq8UyXdONQgVV3BbUJvqm+byFYLvKE/fL8abQEiq1BJIKuv1+G YqX35bn8KF6Q4ZJYrDWzl09/Tgomj77EXZSnUgSqZeTa/xBQs/LyDJIx/IPOuxKmUYNiHw NScOJXR5wow3CeP7zAYVAufRBLjdNhc= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1706306885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YczcxWdjrPt2wQaIPeH9YyG5ctLXO/Bap0odgRcP4+A=; b=UZ5p9YY3q52VEkPIHaIq/9xQJPQyflqW0mQGz3B5veLMEWZ2dt/fPEpc+081GeGDRj1+EK uYGxGFByYJUPNq0IRXPl1U4dj/RZk/t5zv9VY9M7bU+2M3BW71ScaDwSaVdzKxBKPckfK4 SbL3I8rYHw5vnAZkkDciTomdeANmRVM= From: Kent Overstreet To: linux-mm@kvack.org Cc: Kent Overstreet , Vlastimil Babka , Matthew Wilcox , Michal Hocko , "Darrick J . Wong" Subject: [PATCH 2/2] mm: introduce PF_MEMALLOC_NOWARN Date: Fri, 26 Jan 2024 17:07:56 -0500 Message-ID: <20240126220756.395187-2-kent.overstreet@linux.dev> In-Reply-To: <20240126220756.395187-1-kent.overstreet@linux.dev> References: <20240126220756.395187-1-kent.overstreet@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Rspamd-Queue-Id: 279A0C0016 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: pnqqiw7zwoww8zo6k564bh9pmmmij9ex X-HE-Tag: 1706306886-712603 X-HE-Meta: U2FsdGVkX18AVIFVr6kqB8fWCskTvUZR/k3rcY0AMOX/Dmowrcr/DMRFqKNcZ8rua+fZF/wCfnEVVT8fmJE2Hnpt7k9I1Ox5zEy7QV4aUo0e+osepZRfroy4rMIlL3Lmm/JlkpUAmPgu+s+nD57IakyQxSR68xPmv94tMJKYmxKuSDaQx3C1Lft52aDJ0ofWOdrYuTUDPNWRr70A3Y7mf9o/oVQTHmhLFfpiMAzoM+yCaDvuiv1HgGFc6kuxYZpTWKkDKrDeJ9Ddkk7BUnzb3VulgIdteQPn4G62WY+BMNUIEJWOFqpQynpLJsp4WzpjPBudPLayYfXbS0JYCX96zmdtm2K7LimAoo32u2wr+9bMXhjWvep+YshNmXE+gNbOF6W3Xit4JtKHNiczu5cjv45B3TTLn08Llfhkio0LrV05lJzPYpBcHQzVtBAWxjijKnFc8mTCmn3Og+WdBbeV96AqcMk/AGV9UnZjpJRzONuUMmQ7gdC9SmXV1EIIitYdsyZNkXTmJ3Te1y+62iSUYi5ptknYrapuQb68VNmoVDv1Ei6YSmUJ5M4LxwTJdV39BCEaSZ1wKP+6fXI9RPEtBdzVaGq3i0t4DCIxsniQdJmB1YEdKSw4PqVqRN0n9zVrSkwLKwwyN2Q8TxtkRuZktOVoAsjMFX5nAgCXnKoX6KsYRq66A8mjUiT9xNcyLixZgDxxsuR2kiz+PKwPpkj9HBx2kpbrxAyf65hZugk9SHMU5IKBHM96CJMX3ogTfezmhOB8gpPR/IS2oKDfeCqfEyv0/gvdwrfnJxfCVkO2ydlIAsWZdk94A/WBqMdQaoWmzBF9o+QdIydh8v34mLWDC1dvKPaTvXNfag50XNctt50G+agv01xmS1EwGNIwvMdAVmfdsDzKo5kEqNDd5IcjM0iwqnfbmcFYBxnD8x+pfIwTfhDh93zDjaE0mydYMmlW13BIWQfXyyNq/ngWtwC acdH9zMp JC7IMEgiG4rkSK0+XT69ZdEpeZCQcob6+Ycc46YwW2ROEA1c9s2XZJ0fTt+TLCavYSQdFamjguUr7E10PseC2q2IJlBAAwhxsul1sQnvD0yH4rY51El0dA2hr3Zn1bIjgmIM6H7SESUjOGWjdliqvzF7pATpITEg0SUjWHMzWXmZkC7iTI2GyGRD1KZv26bu4NSmpWfnzfwSj3xoh/2VpWtlYmdkavC6kYdAAy7q7izKI1IGB8pIHzT2arQ== 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: If we're using PF_MEMALLOC, we might have a fallback and might not to warn about a failing allocation - thus we need a PF_* equivalent of __GFP_NOWARN. Signed-off-by: Kent Overstreet Cc: Vlastimil Babka Cc: Matthew Wilcox Cc: Michal Hocko Cc: Darrick J. Wong Signed-off-by: Kent Overstreet --- include/linux/sched.h | 8 ++++---- include/linux/sched/mm.h | 8 +++++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index cdb8ea53c365..36a5046ea3fa 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1632,11 +1632,11 @@ extern struct pid *cad_pid; #define PF_KSWAPD 0x00020000 /* I am kswapd */ #define PF_MEMALLOC_NOFS 0x00040000 /* All allocation requests will inherit GFP_NOFS */ #define PF_MEMALLOC_NOIO 0x00080000 /* All allocation requests will inherit GFP_NOIO */ -#define PF_LOCAL_THROTTLE 0x00100000 /* Throttle writes only against the bdi I write to, +#define PF_MEMALLOC_NOWARN 0x00100000 /* All allocation requests will inherit __GFP_NOWARN */ +#define PF_LOCAL_THROTTLE 0x00200000 /* Throttle writes only against the bdi I write to, * I am cleaning dirty pages from some other bdi. */ -#define PF_KTHREAD 0x00200000 /* I am a kernel thread */ -#define PF_RANDOMIZE 0x00400000 /* Randomize virtual address space */ -#define PF__HOLE__00800000 0x00800000 +#define PF_KTHREAD 0x00400000 /* I am a kernel thread */ +#define PF_RANDOMIZE 0x00800000 /* Randomize virtual address space */ #define PF__HOLE__01000000 0x01000000 #define PF__HOLE__02000000 0x02000000 #define PF_NO_SETAFFINITY 0x04000000 /* Userland is not allowed to meddle with cpus_mask */ diff --git a/include/linux/sched/mm.h b/include/linux/sched/mm.h index f00d7ecc2adf..817f5c1bf3d5 100644 --- a/include/linux/sched/mm.h +++ b/include/linux/sched/mm.h @@ -236,7 +236,10 @@ static inline gfp_t current_gfp_context(gfp_t flags) { unsigned int pflags = READ_ONCE(current->flags); - if (unlikely(pflags & (PF_MEMALLOC_NOIO | PF_MEMALLOC_NOFS | PF_MEMALLOC_PIN))) { + if (unlikely(pflags & (PF_MEMALLOC_NOIO | + PF_MEMALLOC_NOFS | + PF_MEMALLOC_NOWARN | + PF_MEMALLOC_PIN))) { /* * NOIO implies both NOIO and NOFS and it is a weaker context * so always make sure it makes precedence @@ -246,6 +249,9 @@ static inline gfp_t current_gfp_context(gfp_t flags) else if (pflags & PF_MEMALLOC_NOFS) flags &= ~__GFP_FS; + if (pflags & PF_MEMALLOC_NOWARN) + flags |= __GFP_NOWARN; + if (pflags & PF_MEMALLOC_PIN) flags &= ~__GFP_MOVABLE; }