Received: by 10.192.165.156 with SMTP id m28csp258922imm; Tue, 17 Apr 2018 09:39:51 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+lxpxcsZ8Zcsxy5zb6wkMWVbXOgAQNPIGWC9oqhdYogbGrMS12zOKLLEWNqSa8pbWG1Fpu X-Received: by 2002:a17:902:bc06:: with SMTP id n6-v6mr2652383pls.97.1523983191947; Tue, 17 Apr 2018 09:39:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523983191; cv=none; d=google.com; s=arc-20160816; b=E4sQryhavfkl2/pm5MCVisSOQpdfJzQgb6zmaQPoGZ1z05pXA6DYHfnnRsPAQW0N2L dzpXupbDbDDQeNVGhfuDNR6faK5voz4VcTBeZJz+VMKlmVH1lSZkB4qeX1ii7c1iAK4U cRcDLmWI4JnYmlOSB5PhHO0ntRb8tNbCcjmcNem8IXec+Bc0KgMV1KsjkIQ8cpkxuj2q 0sG2f925UYsYaNiU9ZwWEjS1a6j0q8FZSHtUI7m7UNWQHxgrk8WvItvoaKh99OS7xhId bTRNki+j5onePtIbCpwT19dUyXjg5mlgdR/UvI8hjppJ3q9bzxU5rkZfa1d9b/Tty3CC /vKA== 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=W2MMiGduTcYr2FSGprTf++7JNmht2PB6ohIfRDRE8aE=; b=OrIbNEOZI8c7Cb1+CaVtyUW3HZpblbWB9mfi06A2t2y+kecwTZMtgo8JNflgCc+kAq 9Goa6bACFlgADaTVFFzKBp4X6xbu6QIUQsoUTP13REbPE1XaCL9hD22xS9WlBs+ypgxw 6kkvDxWBhKAjc6Tko7kZGe9B/QReNZB7CzpTRo9KzchMHkv7djyx7s4KsOf/Jxq6hHvT CK5rcoEwfueNxq/PwAm7ggdGZegAoUDTZ+3BKI6f7aqSyQOaGirdJC31/pplZ4aJwAfM TkCZnSc1K6I3JwdvayDNwSXJidy38nEpSIIDkkrNcRHCjSLbmoFZDrpUOnG2pKwPE4Y8 PSwQ== 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 w7si8611018pfn.363.2018.04.17.09.39.37; Tue, 17 Apr 2018 09:39:51 -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 S1755256AbeDQQiJ (ORCPT + 99 others); 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 Received: from resomta-ch2-14v.sys.comcast.net ([69.252.207.110]) by resqmta-ch2-08v.sys.comcast.net with ESMTP id 8TcMfJwFPhoLR8TcMfMbMd; Tue, 17 Apr 2018 16:38:06 +0000 Received: from gentwo.org ([98.222.162.64]) by resomta-ch2-14v.sys.comcast.net with SMTP id 8TcIfNYOujNm38TcJfVIWl; Tue, 17 Apr 2018 16:38:06 +0000 Received: by gentwo.org (Postfix, from userid 1001) id A9B5E1161681; Tue, 17 Apr 2018 11:38:02 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id A72391160172; Tue, 17 Apr 2018 11:38:02 -0500 (CDT) 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 Precedence: bulk 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.