From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755259AbeDQQiJ (ORCPT ); Tue, 17 Apr 2018 12:38:09 -0400 Received: from resqmta-ch2-08v.sys.comcast.net ([69.252.207.40]:39558 "EHLO resqmta-ch2-08v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754675AbeDQQiG (ORCPT ); Tue, 17 Apr 2018 12:38:06 -0400 Date: Tue, 17 Apr 2018 11:38:02 -0500 (CDT) From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: Vlastimil Babka cc: 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 RESEND] 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: MS4wfC2tcBarzIi4LmxLo5jCBgV9NG8nTk4cKl7qby9jcUednoctKl/uKCI9xGSWCgFWHv0fRgklEEW3+DiXQ3oBGI+utFeT7RmwLUNqPKNR+8HptUHhW1o5 x8Ejg27ot6uUtIEWSPEfqVtdecpKRLPtP/HmmHkjDqeWcoRFnlSKXZX57sEJ2lhNretmolLfTPTNRpIDWj8kNMbtYYwdedrN3dKJwAanvCr7cqZX4WXReniM ghgpOnCXqOLM0LB3hrqEufZGtnhI6jBzBsjbtcriJUEb64XJzyKdQtgfsoPj7hXlQXhRUbV4PmudejOEmdNMxZIp8fv7KQvvX6Rw1QtLq4HSOc8d8M/C9qAu 9NCSEw8nEfDFwEqcNccPLiK+8m/dsrXT3Eo/dIqWYvzkUx1vX1J/hYAPeLYddd7wIHUFUZ+0G3b/Mvplgt52N7SzRPH8PKdviLmBS0VnncYygt4LeSIrIv/l QH8Y5rxNc/eXX4Qr Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 17 Apr 2018, Vlastimil Babka wrote: > On 04/17/2018 04:45 PM, Christopher Lameter wrote: > > But then higher order allocs are generally seen as problematic. > > I think in this case they are better than wasting/fragmenting 384kB for > 640kB object. Well typically we have suggested that people use vmalloc in the past. > > Note that SLUB will fall back to smallest order already if a failure > > occurs so increasing slub_max_order may not be that much of an issue. > > > > Maybe drop the max order limit completely and use MAX_ORDER instead? > > For packing, sure. For performance, please no (i.e. don't try to > allocate MAX_ORDER for each and every cache). No of course not. We would have to modify the order selection on kmem cache creation. > > That > > means that callers need to be able to tolerate failures. > > Is it any different from now? I suppose there would still be > smallest-order fallback involved in sl*b itself? And if your allocation > is so large it can fail even with the fallback (i.e. >= costly order), > you need to tolerate failures anyway? Failures can occur even with < costly order as far as I can telkl. Order 0 is the only safe one. > One corner case I see is if there is anyone who would rather use their > own fallback instead of the space-wasting smallest-order fallback. > Maybe we could map some GFP flag to indicate that. Well if you have a fallback then maybe the slab allocator should not fall back on its own but let the caller deal with it.