Received: by 10.192.165.148 with SMTP id m20csp3948142imm; Mon, 23 Apr 2018 15:42:44 -0700 (PDT) X-Google-Smtp-Source: AIpwx48FRQxDfQ99SHFRx9yUaSt3HMviX3YRZPu7I4w4EyGpAfPtnKEU+bThHedTOqxPjVgJBk68 X-Received: by 10.99.112.70 with SMTP id a6mr18134091pgn.294.1524523364295; Mon, 23 Apr 2018 15:42:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524523364; cv=none; d=google.com; s=arc-20160816; b=quYGS30Z5m2H5rIavvjEeLasSTA+pg8139SN35ETGGF66P+aeY1qNRpKz5HUkPuCSu +KVoDvZHe7wyh9HBNKT4W/J+FLdPZ5q0MAorblYp5kIuca/msiNuvIlL0wj89yCScY8b jHV5OTmRrlCLqEhb1YcPHB7SGoj3BbQXgmhDRw+y7lHjgjhD7lYTV/Bvv5/VlpHKFo0g /pLwCeaq96TTgDsd0i4pFB7LrdGAyK9QDN97M4zi4PBLcRMp7oiglZi6AF+lkiP0imiR E5MTifCjZi1p0j+3VLeQbna89eXyXnijRv2CtXDknpwNYlEcQq77XI/s+LgeT9q7Ghi6 8C9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=8crBWMYYWa66QgOefVbgZOx1Kyw1T0XL1ZAMMiuCuAk=; b=QxwuXbeB+bqNMh8jm3Lmv5TCEPqA+oIU3Hyxc51r3/dYYXkKenahhRQTjsP1124H8C XwlY5/lQ7RbvA70EDXGNOSv688etp4n+FiXUjA7Mua2FlJTXSBKVxkcLwWSe48LBuTxN G4+kzvtR3PP6YoPL8m1mCC6wRrfprO3lPkrg36qbchCTPdKXDOK+1vqKcNrH12Rs9kwk JNPWalbiFOnFA96hi+gTqNUxF/UN6m1Csmnqv0DhXQG8LqE4tH3NbZYeLuslV8pOFB40 vMPR/2jOvIrJoFJQ6rRdjU8sPySLm/vHq1QIllmOfJ2h98NiA5HUEVoPzuHirg7mt8og pD4Q== 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 f64-v6si12884284plf.514.2018.04.23.15.42.29; Mon, 23 Apr 2018 15:42:44 -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 S932597AbeDWWlL (ORCPT + 99 others); Mon, 23 Apr 2018 18:41:11 -0400 Received: from resqmta-po-05v.sys.comcast.net ([96.114.154.164]:49388 "EHLO resqmta-po-05v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932514AbeDWWlK (ORCPT ); Mon, 23 Apr 2018 18:41:10 -0400 Received: from resomta-po-03v.sys.comcast.net ([96.114.154.227]) by resqmta-po-05v.sys.comcast.net with ESMTP id AjLTf5RF7BVaJAk8zf0XEF; Mon, 23 Apr 2018 22:41:09 +0000 Received: from gentwo.org ([98.222.162.64]) by resomta-po-03v.sys.comcast.net with ESMTPA id Ak8wfUdBQqXq5Ak8xfn9Mz; Mon, 23 Apr 2018 22:41:09 +0000 Received: by gentwo.org (Postfix, from userid 1001) id AAF2611616B0; Mon, 23 Apr 2018 17:41:06 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id A82D811616AE; Mon, 23 Apr 2018 17:41:06 -0500 (CDT) Date: Mon, 23 Apr 2018 17:41:06 -0500 (CDT) From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: Vlastimil Babka cc: Michal Hocko , Mikulas Patocka , Mike Snitzer , Matthew Wilcox , Pekka Enberg , linux-mm@kvack.org, dm-devel@redhat.com, David Rientjes , Joonsoo Kim , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [PATCH] SLUB: Do not fallback to mininum order if __GFP_NORETRY is set In-Reply-To: <26580de4-70b5-90f7-b3b9-22f57ba38843@suse.cz> Message-ID: References: <20180419110051.GB16083@dhcp22.suse.cz> <26580de4-70b5-90f7-b3b9-22f57ba38843@suse.cz> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-CMAE-Envelope: MS4wfEcjkcIxzJKVPhWLxpQ2X8DhEQ2pJNDLla7KQesvz0T3n3MzC+1sPzmYvYqssex3H0zdicditeCpMMauUiakGsETr2KH7ewJUW0iS54yKsyd7BeQYbmS arTi9s+kqGj3QywZlQlhSxr7xR729DDHjsSHo6wv/HtYgwbbqNEGmXiAX47+Tdy2cE8yoStynnPRmUMZs8mjurxx2fmkoVN162tG5VTvY+VZVw/pTKL5WcQz Qh/JC5D8gRrC/EB4xo7iWIfVfTBmeQR47kz1AXejCrN4wn7dxqp+n9+3RJCW73pCVvo1+BOxEiyWOHAqkERQYJWBGlF7t8TcOkkmvHNxD5u/3DqsPQdk8Xiu yQ2dGc40tbNV9QUtZBEj3bcKMISNd+jdVev8dqcXS+pXNHDSM8Uu5N3OYvzTbuP2zXx/P5/vY7PxOgyUK4Zbsi6f9IoGROBm94csvhInEj/PUGzb4CG86AA3 3OXBOo13N099PC/0zYk+mB3G05LBq5/RxcnqGg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 21 Apr 2018, Vlastimil Babka wrote: > > The problem is that SLUB does not honor GFP_NORETRY. The semantics of > > GFP_NORETRY are not followed. > > The caller might want SLUB to try hard to get that high-order page that > will minimize memory waste (e.g. 2MB page for 3 640k objects), and > __GFP_NORETRY will kill the effort on allocating that high-order page. Well yes since *_NORETRY says that fallbacks are acceptable. > Thus, using __GPF_NORETRY for "please give me a space-optimized object, > or nothing (because I have a fallback that's better than wasting memory, > e.g. by using 1MB page for 640kb object)" is not ideal. > > Maybe __GFP_RETRY_MAYFAIL is a better fit? Or perhaps indicate this > situation to SLUB with e.g. __GFP_COMP, although that's rather ugly? Yuck. None of that sounds like an intuitive approach.