Received: by 10.213.65.68 with SMTP id h4csp271182imn; Thu, 5 Apr 2018 23:13:45 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/vcFLdkJgSMGZliD2WqY1GLB5YbeGE1DAcCy+vZqVbOefSBzXb/WrlE2QzPT+WpZ1dO7Vf X-Received: by 2002:a17:902:264:: with SMTP id 91-v6mr26014843plc.178.1522995225673; Thu, 05 Apr 2018 23:13:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522995225; cv=none; d=google.com; s=arc-20160816; b=GtXRNaOSk4YmdcVWTca8g5ihnLTUEisHDVfrocEpcbmBbzeDSs0swHkZgSnT4V14aJ ouUPY/wzLJ44JnjBY/R4JtRsceN+3Tmy6zlo+JfZEluLxhYUPl4dmzYcJSXWR9GTkrZP GLEuYkeLPc54KLpItfhrKrmyeCoDZI2zFuawFhN+/jKVYpBjXASDS7adixuNGiIGW5Yn enyyGrb5ybhTUZ8CG8F2LXs9tORwZEWC4kv6BTpMcsNLGQJ0yYuYBLNle/PwZ4FupBDx 6zkT3MHaQS73zCFq01yZxUJSsACoTNuwGtIyoreCmoSzwHJIsoZneGbmWD9NtfSDbgG6 2eCA== 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:from:date:arc-authentication-results; bh=767NxFRbt4a1NnjWMT6F/VJGhHwyxIJmMH/IfkGbTBw=; b=UN5SoIPzdtoPBLKedg5LqvDZGYbhK5H3RiMvBKET3YNOn5Hf3gIhIqShYaOnKuMDyt Ht9ygFaOhrh17Ki7hnWq+HTbWKt/ORZPfcRcJprBbeVQvq9HeXJov6Y3pd/fZcmKSr8Z yjez5X3IdqS8lTOYq7SUiz2a3Gr8YowttYQkb5RFf6Oo/HUxgYaJ0Wrxo5pDIYe+rzdb kHr7Qw44bnWxISAAsuP1tHHue572HLmlbsqRpuaf6o/a9qRauWZ24tQ44pUAoqa5yN9O QYFelor+Cb1uvzgRo0Sb/Iq1Nd5mgDVeWGRTtKw92bMjBAnylu95laLAAVxUXV8IVd/r yXBg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b18si7552827pfl.100.2018.04.05.23.13.05; Thu, 05 Apr 2018 23:13:45 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752566AbeDFGJ6 (ORCPT + 99 others); Fri, 6 Apr 2018 02:09:58 -0400 Received: from mx2.suse.de ([195.135.220.15]:59345 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752349AbeDFGJ5 (ORCPT ); Fri, 6 Apr 2018 02:09:57 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 9155DAF6C; Fri, 6 Apr 2018 06:09:55 +0000 (UTC) Date: Fri, 6 Apr 2018 08:09:53 +0200 From: Michal Hocko To: Matthew Wilcox Cc: LKML , linux-mm@kvack.org, Vlastimil Babka Subject: Re: __GFP_LOW Message-ID: <20180406060953.GA8286@dhcp22.suse.cz> References: <20180404114730.65118279@gandalf.local.home> <20180405025841.GA9301@bombadil.infradead.org> <20180405142258.GA28128@bombadil.infradead.org> <20180405142749.GL6312@dhcp22.suse.cz> <20180405151359.GB28128@bombadil.infradead.org> <20180405153240.GO6312@dhcp22.suse.cz> <20180405161501.GD28128@bombadil.infradead.org> <20180405185444.GQ6312@dhcp22.suse.cz> <20180405201557.GA3666@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180405201557.GA3666@bombadil.infradead.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 05-04-18 13:15:57, Matthew Wilcox wrote: > On Thu, Apr 05, 2018 at 08:54:44PM +0200, Michal Hocko wrote: [...] > >From a "user guide" perspective: > > When allocating memory, you can choose: OK, we already split the documentation into these categories. So we got at least the structure right ;) > - What kind of memory to allocate (DMA, NORMAL, HIGHMEM) > - Where to get the pages from > - Local node only (THISNODE) > - Only in compliance with cpuset policy (HARDWALL) > - Spread the pages between zones (WRITE) > - The movable zone (MOVABLE) > - The reclaimable zone (RECLAIMABLE) > - What you are willing to do if no free memory is available: > - Nothing at all (NOWAIT) > - Use my own time to free memory (DIRECT_RECLAIM) > - But only try once (NORETRY) > - Can call into filesystems (FS) > - Can start I/O (IO) > - Can sleep (!ATOMIC) > - Steal time from other processes to free memory (KSWAPD_RECLAIM) What does that mean? If I drop the flag, do not steal? Well I do because they will hit direct reclaim sooner... > - Kill other processes to get their memory (!RETRY_MAYFAIL) Not really for costly orders. > - All of the above, and wait forever (NOFAIL) > - Take from emergency reserves (HIGH) > - ... but not the last parts of the regular reserves (LOW) What does that mean and how it is different from NOWAIT? Is this about the low watermark and if yes do we want to teach users about this and make the whole thing even more complicated? Does it wake kswapd? What is the eagerness ordering? LOW, NOWAIT, NORETRY, RETRY_MAYFAIL, NOFAIL? -- Michal Hocko SUSE Labs