From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f71.google.com (mail-pg0-f71.google.com [74.125.83.71]) by kanga.kvack.org (Postfix) with ESMTP id 909126B03A5 for ; Fri, 7 Apr 2017 03:38:51 -0400 (EDT) Received: by mail-pg0-f71.google.com with SMTP id u3so62552617pgn.12 for ; Fri, 07 Apr 2017 00:38:51 -0700 (PDT) Received: from out0-194.mail.aliyun.com (out0-194.mail.aliyun.com. [140.205.0.194]) by mx.google.com with ESMTP id t188si4304902pfd.87.2017.04.07.00.38.50 for ; Fri, 07 Apr 2017 00:38:50 -0700 (PDT) Reply-To: "Hillf Danton" From: "Hillf Danton" References: <20170405074700.29871-1-vbabka@suse.cz> <20170405074700.29871-3-vbabka@suse.cz> In-Reply-To: <20170405074700.29871-3-vbabka@suse.cz> Subject: Re: [PATCH 2/4] mm: introduce memalloc_noreclaim_{save,restore} Date: Fri, 07 Apr 2017 15:38:43 +0800 Message-ID: <092401d2af71$fc320ef0$f4962cd0$@alibaba-inc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Language: zh-cn Sender: owner-linux-mm@kvack.org List-ID: To: 'Vlastimil Babka' , 'Andrew Morton' Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, 'Michal Hocko' , 'Mel Gorman' , 'Johannes Weiner' , linux-block@vger.kernel.org, nbd-general@lists.sourceforge.net, open-iscsi@googlegroups.com, linux-scsi@vger.kernel.org, netdev@vger.kernel.org, 'Michal Hocko' On April 05, 2017 3:47 PM Vlastimil Babka wrote: > > The previous patch has shown that simply setting and clearing PF_MEMALLOC in > current->flags can result in wrongly clearing a pre-existing PF_MEMALLOC flag > and potentially lead to recursive reclaim. Let's introduce helpers that support > proper nesting by saving the previous stat of the flag, similar to the existing > memalloc_noio_* and memalloc_nofs_* helpers. Convert existing setting/clearing > of PF_MEMALLOC within mm to the new helpers. > > There are no known issues with the converted code, but the change makes it more > robust. > > Suggested-by: Michal Hocko > Signed-off-by: Vlastimil Babka > --- Acked-by: Hillf Danton -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org