From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-f200.google.com (mail-qt0-f200.google.com [209.85.216.200]) by kanga.kvack.org (Postfix) with ESMTP id 78BC36B0006 for ; Tue, 17 Apr 2018 17:42:27 -0400 (EDT) Received: by mail-qt0-f200.google.com with SMTP id w2so13273464qti.8 for ; Tue, 17 Apr 2018 14:42:27 -0700 (PDT) Received: from resqmta-ch2-04v.sys.comcast.net (resqmta-ch2-04v.sys.comcast.net. [2001:558:fe21:29:69:252:207:36]) by mx.google.com with ESMTPS id y9si19023359qth.129.2018.04.17.14.42.26 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Apr 2018 14:42:26 -0700 (PDT) Date: Tue, 17 Apr 2018 16:42:24 -0500 (CDT) From: Christopher Lameter Subject: Re: slab: introduce the flag SLAB_MINIMIZE_WASTE In-Reply-To: Message-ID: References: <20c58a03-90a8-7e75-5fc7-856facfb6c8a@suse.cz> <20180413151019.GA5660@redhat.com> <20180416142703.GA22422@redhat.com> <20180416144638.GA22484@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: Mikulas Patocka Cc: Vlastimil Babka , 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 On Tue, 17 Apr 2018, Mikulas Patocka wrote: > > > The slub subsystem does actual fallback to low-order when the allocation > > > fails (it allows different order for each slab in the same cache), but > > > slab doesn't fallback and you get NULL if higher-order allocation fails. > > > So, SLAB_MINIMIZE_WASTE is needed for slab because it will just randomly > > > fail with higher order. > > > > Fix Slab instead of adding a flag that is only useful for one allocator? > > Slab assumes that all slabs have the same order, so it's not so easy to > fix it. Well since SLAB uses compound pages one could easily determine the order of the page and thus also support multiple page orders there.