Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp740874ybb; Wed, 1 Apr 2020 08:47:37 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtkVmNx3XGC4SI+T4CkuSZQ1SBilv4AbmmFaESQCaYYAOyEnb//wwPLDkdYGM7q07rO8TBT X-Received: by 2002:a9d:943:: with SMTP id 61mr17655804otp.3.1585756056871; Wed, 01 Apr 2020 08:47:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585756056; cv=none; d=google.com; s=arc-20160816; b=DCjps91xXpmMJlmbd+7GNTUsCXgfx/nmd1GpNbp7j3YWB8+p/uX++yd8D52mRXl9wd D6Oyvi8H8dDdP9z3hU5iGmLMLFjVF24KlWc45x+V5t3k9r9GD7bgQt/C1o02ycWYFaQ0 Vc/cWNrfQ7XJ2ngrXNA9oKFyXWZrN0qozOvHcnnWTmkfQT6mBmNamIB1NsSaHZltwgxv rgrBRMDfx9K71VDXTy5O4aNVgirEWt6HNCUu4ugoS8OOatwKLaKg33drbBXxM/W8JrI7 dW5t9Ag6/ESpI5RbHZr8RmQnVBugXYXbckRspa2EkVGn8EkFX0MhpnXhnbnk+EyuBSYY YzbQ== 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=eGo2AC3bFo0cX0Y80FNvQpP9bE2/c336JeB41lJRyRE=; b=isQ0bnaOsQLnHfIaZB883CKr5hJCols7TnwEUOHiQfh/qUpPVgWRMU5SaX07rY4G7d abnq6EykhWmjHW3fZvQ2sMUnHx6tW2cRCzUCrqMZpQladi93qxoNI5uBnmPXJ144pSXU L6BYJFihkh04fe+PXJVa4AbqQA90/vi6hmWQJalv8/LbTVLQSgxRoNp+6Xxt5W1urY8U mxdMda4AGilznD/fPUXbnGWveRT+BrjL+4L7WXSY6A0sHwgDdGtneMYVzvIBkLoy5KMm JIr5HBszupg2FetxH6gbsoRyhl3AceFalOMKBVLepaWxtHH1OpgUIrVHiFOgvRySRKjH 5zzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tZRaDOcY; 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 w18si917876otp.73.2020.04.01.08.47.23; Wed, 01 Apr 2020 08:47:36 -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=tZRaDOcY; 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 S1733158AbgDAPqc (ORCPT + 99 others); Wed, 1 Apr 2020 11:46:32 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:35776 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732889AbgDAPqc (ORCPT ); Wed, 1 Apr 2020 11:46:32 -0400 Received: by mail-lj1-f194.google.com with SMTP id k21so26305401ljh.2; Wed, 01 Apr 2020 08:46:30 -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=eGo2AC3bFo0cX0Y80FNvQpP9bE2/c336JeB41lJRyRE=; b=tZRaDOcYiY6nTed7mYmAPRDObnjaWlOo8msoex1+RLkm5gRTGA7S/T7pIUv688qVWC 9KQtH9PEB9F9WD9iur48UFi0rhlm5OlkBh4BC56uASN6dSjf/4yz/puLfcZwm9ovxsMm ZIuNxR4sMs2HNZHIAQ05TJQbaKiy6joyqe0KXFvDo1VW/jpri9RYQJkSWFXp+91cFSO/ nOjcwx+pmIYUBonKXicJWR2I/gDWlGfRoOpHFdlRQmcU+llIMqvdV2pCVTPdKOBrTwvF SwC51wSyLqib99jVteWF9BH+lDGytmvrIdEN5YhNrhhnsXiQyvdyOPTo/d1+eJ+0D1Ra 4zfQ== 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=eGo2AC3bFo0cX0Y80FNvQpP9bE2/c336JeB41lJRyRE=; b=mxfUgSQlqy6OdFE19okhc5VNUK5/1i5+knN9Vzd39EcrzlmBsQT1hudey3FsjTliLA T+F0dq/8U6H3b9gozSdEvCK7hroEAiGVIPbzamRO2qfBRkr0wHv6NoSjFZfvR/jxuXme 70FZAsBzmzUMMPESH867hD33/ERJTodcHpjklkHSPYyXjyfjNbKiw5AmAeKkAkd1bmhw MYs9s5W/QKOIysNjTolQE6w5V6bU8mk87MgfmPi24U/qn5qZkDCt4DSSuxQKm3b0PYz7 PnGHWuTdVlWPV4rtiev+NeyyudnVGqoqW2AGFzwrgNgQmBh1Gq1GQFHx9G2QIXlgSmGm FvhA== X-Gm-Message-State: AGi0Pua2b/1NJo4rmcHtwivAt7+NFg95ro+ZN6D8FFur6Kb83ySUIGbR FN3tdvmHStkQXWU+p3sWf9nGfOzyNQU= X-Received: by 2002:a2e:8195:: with SMTP id e21mr13332304ljg.49.1585755989539; Wed, 01 Apr 2020 08:46:29 -0700 (PDT) Received: from pc636 (h5ef52e31.seluork.dyn.perspektivbredband.net. [94.245.46.49]) by smtp.gmail.com with ESMTPSA id v20sm1839292lfe.52.2020.04.01.08.46.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Apr 2020 08:46:28 -0700 (PDT) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Wed, 1 Apr 2020 17:46:18 +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: <20200401154618.GA3907@pc636> References: <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> <20200401132258.GA1953@pc636> <20200401152805.GN22681@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200401152805.GN22681@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 > > > > > > 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! > > Welcome. I wish all those gfp flags were really clear but I fully > understand that people who are not working with MM regurarly might find > it confusing. Btw. have __GFP_RETRY_MAYFAIL is documented in gfp.h and > it is documented as the reclaim modifier which should imply that it has > no effect when the reclaim is not allowed which is the case for any non > sleeping allocation. If that relation was not immediately obvious then I > think we need to make it explicit. Would you find it useful? > > E.g. > > diff --git a/include/linux/gfp.h b/include/linux/gfp.h > index e3ab1c0d9140..8f09cefdfa7b 100644 > --- a/include/linux/gfp.h > +++ b/include/linux/gfp.h > @@ -127,6 +127,8 @@ struct vm_area_struct; > * > * Reclaim modifiers > * ~~~~~~~~~~~~~~~~~ > + * Please note that all the folloging flags are only applicable to sleepable > + * allocations (e.g. %GFP_NOWAIT and %GFP_ATOMIC will ignore them). > * > * %__GFP_IO can start physical IO. > * That would be definitely clear for me! -- Vlad Rezki