Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp613645ybb; Wed, 1 Apr 2020 06:35:59 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuQ2ujxg95ep+ROSXV2uxvSzvxIRDdZ0RTlwBHYBJHf15iBDA5ZA77vJV/JO6Wy8AQiItdf X-Received: by 2002:a05:6830:1aee:: with SMTP id c14mr16193972otd.141.1585748158773; Wed, 01 Apr 2020 06:35:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585748158; cv=none; d=google.com; s=arc-20160816; b=J//LyNzT83iyzneXrtYtsMLXRXEDTJLhoHL6cJy7qxK1GiXR9mrtBzu4KErxd59EtA eFaVg4r+BdK8oDWKPWiFaynta/XWFYsdUIaIzfWC5BGDzHu24Y7xwm6FkdPAktUET5Qs EUNJImVl5/tokMYlzjtjKPfFX7ROM+FAVrCX/jehiOV30t2Sn0OzQqhCvZFYuIRxwY7i EUcKwABv+GAF5bPTC3eStuqaEGTkikPYztkI/+fDqItu6c7EzWO8F/iStDhW+xW5TEbr n4k9ho6RRgFY48qYHolyKhoRo1fQiHf/fJBBKLBpmza0tD0C4SkkRp/cFKNaNCL96FJt i3fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date:from:dkim-signature; bh=x+0+LY1hYid8SN3qoqXgUaMr5zJLkCBGndVrhVygy6s=; b=R9WiXA8O7nGzVa8ZeKa1w9C+87FmtiR82+TVNCo0nG9U+6vcGydiVMv0/narr2dYe2 U+ByGzLb2m5lgUIV8tqWicm/Ktq1YJJmLu4l/ovYv6lM6NG2ntxVRGgytR3tAKgH1PBW NafD4taLRdAuntbRjgBwtCkQblLaScPbGqdY/fWoTHp+aceVjhUb4392beQ+I6wsY0uH xaJFJ1OD9mrS75vFFtyzG2ADzwhxa9AnhF3T8LsAkqknJ3o6nkadei+txj8V35LNKZny k+/dDEnqhWBG0/ld/Bx26+sfxskNRLDNCBcSzmmBIiDfqN/cxfyKjvwKAlzDkC13ru4+ CEDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Chcf0o+1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r205si928723oig.174.2020.04.01.06.35.45; Wed, 01 Apr 2020 06:35:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Chcf0o+1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732565AbgDANXK (ORCPT + 99 others); Wed, 1 Apr 2020 09:23:10 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:36801 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732289AbgDANXJ (ORCPT ); Wed, 1 Apr 2020 09:23:09 -0400 Received: by mail-lf1-f66.google.com with SMTP id w145so1269628lff.3; Wed, 01 Apr 2020 06:23:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=x+0+LY1hYid8SN3qoqXgUaMr5zJLkCBGndVrhVygy6s=; b=Chcf0o+1x+pHXlHz3a+Of7l1Fb/v7AlLTSaW8A+lrJMq3PW+0BUZMUBsmwYUyUYs2w Pc6vmF5cFBAHyoOz6hWDtfa3cqQIa6zOBjUjDyHbxtMKv8lrzYESLc3W8OjupBMhCLIb CSqWBuSd310VTAJPcXwDLGi79qx7mwz3ab8IwfHUdRK5SRz0Cd2kSDSmuG8+YC0+z9j2 JWfATYzgpLCOEpl/BYkEWHkSfUZ5J39gCGLJeWeuFiDD5pAHrC0ad9R2NRHr1SndCIhQ uM3Gqek1l1BUq1oq+tbzkmtfZtS1PIIyqQ/hh3xGFVYI7xX9IPiJZhbUUAO8TeXRy59K E/rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=x+0+LY1hYid8SN3qoqXgUaMr5zJLkCBGndVrhVygy6s=; b=Fz84fvBEUJhiXahwSRo4htHwhtmbyizkLoW2/1HwdMS2oYrzdZ7HrkfN7xryCbc7yt XoHe6QYbBn+7hqbKkKZXMUlZl903vCmiJV22zsybyvgoQRkh7oq25MnxU78NwxSn2+7C 3rnWjy3kPQYgC/TT4zAgXKB9bO7PfXdgxYr/pXJMPAHyo5OpMve0LzdVTGnef8KrKlRR gG1DD3g8Q5YPxpbgYZ4RSnNAyeuulG9+tij/NRSYEFrw1EbzESMOZshk0mru+FKei5gy m3924TWvP6jZDDmkUXwU88nBFjSYMRYjjNl/7LfcfP5dXVYa1QpTL30nTqLjDbgBEVli ylhQ== X-Gm-Message-State: AGi0PuYr6m6J4/Gmk9+TSdlwLaQ1DNNH7RjQL4iJEQOOnuFyhWMPHGO/ K0yeh9JMZnu3OCJgyWCvZMA= X-Received: by 2002:a19:3f47:: with SMTP id m68mr14640157lfa.210.1585747386899; Wed, 01 Apr 2020 06:23:06 -0700 (PDT) Received: from pc636 (h5ef52e31.seluork.dyn.perspektivbredband.net. [94.245.46.49]) by smtp.gmail.com with ESMTPSA id 24sm1183836ljv.105.2020.04.01.06.23.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Apr 2020 06:23:06 -0700 (PDT) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Wed, 1 Apr 2020 15:22:58 +0200 To: Michal Hocko Cc: Uladzislau Rezki , Joel Fernandes , linux-kernel@vger.kernel.org, linux-mm@kvack.org, rcu@vger.kernel.org, willy@infradead.org, peterz@infradead.org, neilb@suse.com, vbabka@suse.cz, mgorman@suse.de, Andrew Morton , Josh Triplett , Lai Jiangshan , Mathieu Desnoyers , "Paul E. McKenney" , Steven Rostedt Subject: Re: [PATCH RFC] rcu/tree: Use GFP_MEMALLOC for alloc memory to free memory pattern Message-ID: <20200401132258.GA1953@pc636> References: <20200331131628.153118-1-joel@joelfernandes.org> <20200331145806.GB236678@google.com> <20200331153450.GM30449@dhcp22.suse.cz> <20200331161215.GA27676@pc636> <20200401070958.GB22681@dhcp22.suse.cz> <20200401123230.GB32593@pc636> <20200401125503.GJ22681@dhcp22.suse.cz> <20200401130816.GA1320@pc636> <20200401131528.GK22681@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200401131528.GK22681@dhcp22.suse.cz> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > We call it from atomic context, so we can not sleep, also we do not have > > any existing context coming from the caller. I see that GFP_ATOMIC is high-level > > flag and is differ from __GFP_ATOMIC. It is defined as: > > > > #define GFP_ATOMIC (__GFP_HIGH|__GFP_ATOMIC|__GFP_KSWAPD_RECLAIM) > > > > so basically we would like to have __GFP_KSWAPD_RECLAIM that is included in it, > > because it will also help in case of high memory pressure and wake-up kswapd to > > reclaim memory. > > > > We also can extract: > > > > __GFP_ATOMIC | __GFP_HIGH | __GFP_RETRY_MAYFAIL | __GFP_KSWAPD_RECLAIM > > > > but that is longer then > > > > GFP_ATMOC | __GFP_RETRY_MAYFAIL > > OK, if you are always in the atomic context then GFP_ATOMIC is > sufficient. __GFP_RETRY_MAYFAIL will make no difference for allocations > which do not reclaim (and thus not retry). Sorry this was not clear to > me from the previous description. > Ahh. OK. Then adding __GFP_RETRY_MAYFAIL to GFP_ATOMIC will not make any effect. Thank you for your explanation! -- Vlad Rezki