From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8887AC433E1 for ; Tue, 11 Aug 2020 10:21:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 52E9B2054F for ; Tue, 11 Aug 2020 10:21:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 52E9B2054F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C47066B0005; Tue, 11 Aug 2020 06:21:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BF73A6B0006; Tue, 11 Aug 2020 06:21:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B0C7B6B0007; Tue, 11 Aug 2020 06:21:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0045.hostedemail.com [216.40.44.45]) by kanga.kvack.org (Postfix) with ESMTP id 975EE6B0005 for ; Tue, 11 Aug 2020 06:21:33 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 4478B181AC9CB for ; Tue, 11 Aug 2020 10:21:33 +0000 (UTC) X-FDA: 77137896066.14.cork94_54095ca26fe2 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin14.hostedemail.com (Postfix) with ESMTP id 1721018229818 for ; Tue, 11 Aug 2020 10:21:33 +0000 (UTC) X-HE-Tag: cork94_54095ca26fe2 X-Filterd-Recvd-Size: 2700 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf16.hostedemail.com (Postfix) with ESMTP for ; Tue, 11 Aug 2020 10:21:32 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 1B968AE51; Tue, 11 Aug 2020 10:21:52 +0000 (UTC) Date: Tue, 11 Aug 2020 12:21:24 +0200 From: Michal Hocko To: Uladzislau Rezki Cc: LKML , RCU , linux-mm@kvack.org, Andrew Morton , Vlastimil Babka , "Paul E . McKenney" , Matthew Wilcox , "Theodore Y . Ts'o" , Joel Fernandes , Sebastian Andrzej Siewior , Oleksiy Avramchenko Subject: Re: [RFC-PATCH 1/2] mm: Add __GFP_NO_LOCKS flag Message-ID: <20200811102124.GH4793@dhcp22.suse.cz> References: <20200809204354.20137-1-urezki@gmail.com> <20200809204354.20137-2-urezki@gmail.com> <20200810123141.GF4773@dhcp22.suse.cz> <20200810160739.GA29884@pc636> <20200810192525.GG4773@dhcp22.suse.cz> <20200811091807.GA2634@pc636> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200811091807.GA2634@pc636> X-Rspamd-Queue-Id: 1721018229818 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 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: On Tue 11-08-20 11:18:07, Uladzislau Rezki wrote: > On Mon, Aug 10, 2020 at 09:25:25PM +0200, Michal Hocko wrote: > > On Mon 10-08-20 18:07:39, Uladzislau Rezki wrote: > > > > On Sun 09-08-20 22:43:53, Uladzislau Rezki (Sony) wrote: [...] > > > As i described before, calling the __get_free_page(0) with 0 as argument > > > will solve the (a). How correctly is it? From my point of view the logic > > > that bypass the wakeup path should be explicitly defined. > > > > gfp_mask == 0 is GFP_NOWAIT (aka an atomic allocation request) which > > doesn't wake up kswapd. So if the wakeup is a problem then this would be > > a way to go. > > > What do you mean Michal? gfp_mask 0 != GFP_NOWAIT: > > #define GFP_NOWAIT (__GFP_KSWAPD_RECLAIM) > > it does wakeup of the kswapd. Or am i missing something? Please comment. > If we are about to avoid the kswapd, should we define something special? > > #define GFP_NOWWAKE_KSWAPD 0 Sorry, I was more cryptic than necessary. What I meant is that GFP_NOWAIT is the basic non-sleepable allocation. It does wake up kswapd but a lack of it can be expressed GFP_NOWAIT & ~__GFP_KSWAPD_RECLAIM which is 0, now. The mouthfull variant is better for future maintainability. -- Michal Hocko SUSE Labs