From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753281AbeDQVm3 (ORCPT ); Tue, 17 Apr 2018 17:42:29 -0400 Received: from resqmta-ch2-01v.sys.comcast.net ([69.252.207.33]:56454 "EHLO resqmta-ch2-01v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752606AbeDQVm1 (ORCPT ); Tue, 17 Apr 2018 17:42:27 -0400 Date: Tue, 17 Apr 2018 16:42:24 -0500 (CDT) From: Christopher Lameter X-X-Sender: cl@nuc-kabylake 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 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> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-CMAE-Envelope: MS4wfG/fpMw6Cw8ILmhCUDJYYkNMkvXlq6fiFv51mJUUpMvpOTQN0hErqggbJJnnzWwqii8btbLqiKJ71Jh/TQbitLnEZyMhmN2+GLQRopJQPc5CoKWimw6m RNiogn3LM9YKVbFL7TEoGILHGdM9AyDBJooQpW1bdQEoZ4+SIR5EuOGAyX5lfIil1Y3SsFBmM2M5/f6kgRhucy/L6REwGRRx/SvAkKzRQ4dX6t3OcucyUhZT iQTBdhX2Kz0HYE0+uYSHjUIurZu8FQWEo+YhrqyJxFsKDf2oBjtjTFaRWgV+LAg2vVeS8LHnPl3pQ/IHfVAi84+RFbEgr25cnFu4e9f0xaMTC1DPLBoVpMTP VYpzMW5RVWEv/g+SCdtx9QORJOj3bLGokuGlg/yvzLnuUjWOd5pFq8Z+QZ/9Gjet3YpSZSEeqAReYxpfeOvv71vrnUB7M/NvxQjxysYB8qMJAbFKSKGIEh83 yObConGvn3Y4YUkv Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: 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.