Received: by 10.192.165.156 with SMTP id m28csp391673imm; Tue, 17 Apr 2018 11:55:55 -0700 (PDT) X-Google-Smtp-Source: AIpwx49mbb/rAyyYyTVzmJKQnm8YQaeHUhwrUE6COAR4fRvXl7v5zJmsbC8P6k9jflkeF6/RDcAA X-Received: by 10.99.110.199 with SMTP id j190mr2479089pgc.71.1523991355481; Tue, 17 Apr 2018 11:55:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523991355; cv=none; d=google.com; s=arc-20160816; b=xg+Fx1YhHrEsOh2rsXOaQqVvaE1fz/NoC+xFy3grK/hq/6tA5o8X4aYKYjQzamRjT0 qabIDqb0609IAM9xMCq8/3A9j036WQOwLY+d5BS/Bnt72IvzeqI3/epVOc1oErheQ31f PI/brRKWxdZBaQ4/4sMVMGLlI1bsOespssOKUGJvoNtRgxCwMtAxLkmblsMsliAH9GJE 0H6ijBU+5RFWghr1T7PxnirEdwV+qwyVQlwiSLOb9oERxiWxJG57HIMhfWlEuuh8Xg5x 1vya1hEEEMyKwr3D7+9i0K7EdaKz9SAoeXky1z4IRpIaA6zK173K0UfH6c9H2k4nEYr3 sAnQ== 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=635FamzfheqTMoifvcUpN9ZB1lumkoXh76TOu7LOHo8=; b=bhnzMjE94UTVVE5qe8z+Xe4SyWkRJ0KpqFsJzPPlc42ZIzTgCrByAYyr4KwaKJAQkb QoDnlVYoigHEncHHGWkBTlgHdHNHJgCtM6JKimEyXOoNHk/xbuN9t3Thp/01rcAB9X6W YVJbFrRe/M1pzyfdxeZZ6rgvUFw9Wogn72mUR5sjhGmmx0hBDDP8O5K4kRoegSGz+EJ7 ikaGd+Rwg3MMkDgHKaXJ9zBSUWl3wQj64/O4L3HN+S+4tM2EWF9igfUR51+oMnuWfcbx 6TqJf3JtCyaPS1KlytfRwL09oygv7DT4eOQjUfMwkvah6uwYit/E1gxwtlNmrkroZEy3 ZyVg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s15si5463752pgc.33.2018.04.17.11.55.38; Tue, 17 Apr 2018 11:55:55 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752738AbeDQSyQ (ORCPT + 99 others); Tue, 17 Apr 2018 14:54:16 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:40626 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752206AbeDQSxr (ORCPT ); Tue, 17 Apr 2018 14:53:47 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 119924023112; Tue, 17 Apr 2018 18:53:47 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (file01.intranet.prod.int.rdu2.redhat.com [10.11.5.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AD47D2026DFD; Tue, 17 Apr 2018 18:53:46 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (localhost [127.0.0.1]) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4) with ESMTP id w3HIrk4s027655; Tue, 17 Apr 2018 14:53:46 -0400 Received: from localhost (mpatocka@localhost) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4/Submit) with ESMTP id w3HIrjPD027651; Tue, 17 Apr 2018 14:53:45 -0400 X-Authentication-Warning: file01.intranet.prod.int.rdu2.redhat.com: mpatocka owned process doing -bs Date: Tue, 17 Apr 2018 14:53:45 -0400 (EDT) From: Mikulas Patocka X-X-Sender: mpatocka@file01.intranet.prod.int.rdu2.redhat.com To: Christopher Lameter 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.02 (LRH 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Tue, 17 Apr 2018 18:53:47 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Tue, 17 Apr 2018 18:53:47 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'mpatocka@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 17 Apr 2018, Christopher Lameter wrote: > On Mon, 16 Apr 2018, Mikulas Patocka wrote: > > > dm-bufio deals gracefully with allocation failure, because it preallocates > > some buffers with vmalloc, but other subsystems may not deal with it and > > they cound return ENOMEM randomly or misbehave in other ways. So, the > > "SLAB_MINIMIZE_WASTE" flag is also saying that the allocation may fail and > > the caller is prepared to deal with it. > > > > 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. Mikulas