Received: by 10.192.165.156 with SMTP id m28csp532375imm; Tue, 17 Apr 2018 14:44:17 -0700 (PDT) X-Google-Smtp-Source: AIpwx49qQrGGjLmcNkfnyS7j9fYNvWX71BFUpJzeOrEAPHFLy2RQnM3oynMgeUrngegTMNRWtkj2 X-Received: by 2002:a17:902:362:: with SMTP id 89-v6mr3650421pld.270.1524001457934; Tue, 17 Apr 2018 14:44:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524001457; cv=none; d=google.com; s=arc-20160816; b=vGQE3P1md2jzAnBHFZt2dFL4FVsiICAO4f1KYBdcRKmO2gZcI1r7S22uSnCPsgyn1b 60kyPFRoAlZxmwmioV2cAPrv1q/FHn9uEpPmf+JHmOrANzViyRb0N+woGYtrsmr6bO7h pBUcESmfMl+8LajixHfWGu1p5On1agCnYYkuHN1nFQN6SyMa5+6DatVytGKK5LW8dJHB 9eBVeibX8BnAFtYN3QTd3Icq1PBprpD//wsn9WxUH0EyTX0Ogq3uaaZ3t7zoBh7KFE1g ua040xa/jBHogGHITCUUI7PEPyZHTOAUrr9FaR9anS/ivwKxpYb9wngawToxHDc9P8RZ iQIw== 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=mPYCMEWURyi1CE+ffHX1MEcWVHoUa/2HoKktNZwU080=; b=PIe+NiMpbxTjAjuqo0oG30fVgku6qlAEOUN5pWUWN+XLRYQab6WB8KktQqcUPXd+HI i/+6WjVMCL2wqC7bWs/ytS49vCfBTJME/SDsrzXphYnkObFHTDo2tDu3d5SJ1H6Qm4E6 B8kGJCbrGIDSd5eIWNzh+RZE9Dw+Ej7Y/7AZFA7an3KlqqoFncida5Ri8C7hSWQKjxXe tx+PpSsOG8CVJRYXyAoRi8xsdA3X3dsgehhGqxOS2Neg7nB1YzCOzUesZ7D2ORXG/tLk HkEGzjfTBqhp3dgBB4bEssKjeZ4ddS/mpD+FlPwtzUx2r80inHFyObiLmirEF8w+7YpU xm+g== 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 t134si50873pgc.519.2018.04.17.14.44.03; Tue, 17 Apr 2018 14:44:17 -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 S1753270AbeDQVm3 (ORCPT + 99 others); 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 Received: from resomta-ch2-18v.sys.comcast.net ([69.252.207.114]) by resqmta-ch2-01v.sys.comcast.net with ESMTP id 8YLUffZVOtYHF8YMsfmPI5; Tue, 17 Apr 2018 21:42:26 +0000 Received: from gentwo.org ([98.222.162.64]) by resomta-ch2-18v.sys.comcast.net with SMTP id 8YMrfS6qLU3ED8YMrfUFCI; Tue, 17 Apr 2018 21:42:26 +0000 Received: by gentwo.org (Postfix, from userid 1001) id 066321161681; Tue, 17 Apr 2018 16:42:25 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id 02C591160172; Tue, 17 Apr 2018 16:42:25 -0500 (CDT) 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 Precedence: bulk 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.