Received: by 10.192.165.156 with SMTP id m28csp133865imm; Tue, 17 Apr 2018 07:42:28 -0700 (PDT) X-Google-Smtp-Source: AIpwx49S1AXqhihkpCazg3oBtb3UXxttbSS7001zpUTYiKR5hWUVdIKj1cBEJZ6571wr0j8JGc0G X-Received: by 2002:a17:902:b486:: with SMTP id y6-v6mr2248410plr.229.1523976148108; Tue, 17 Apr 2018 07:42:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523976148; cv=none; d=google.com; s=arc-20160816; b=SMZkKwBtAH1b369rVbd4HN/r8nam9MmtUwwutDJTd/+uJhtvq80RDWVTTz6ccMUBeU w8xjjmMitc4YSbc6S/LbX2hBJlZOcRTC3iw9OIWYjVtrFVLKsglLWmJcbWCe78vi8iQU JcnnQFrQzrpforldhj0nUO2SpGff8I2ipokJNbLNzyPsXvA6NsAE7WTPWys+UJ6DY4Gu Zhlzoote4daDYBUcu+8XUhrwioZRkqmPk2GE5jaaOhlewq78BiaizT63RRxLxJOgstw4 cpwOjSjF1usRBMDAN00+7Fe7UkcOUHCuEt5c23elHpgNiDSwB1lHx6U9NtesGILIeJ7M HRYQ== 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=tHMFB0aIKsyjReuTkFnGP1PEw7PVpIWCPTETpIUNtyE=; b=UDQVf9ZrsombaHt22Wk0LZ2YemRvZiJ8VPw5GNKkvy1VzU3A1qPVXd2YWGijhP9VEc aOGSBztUzk6LLOakLumPox/bBMqYzniYglrJJCdfbGQRPWhhkTCNbfq4TVWix6L8Ulkv 33fXVPJYOOWhpk9VT2AmnEKFl3evmO81xVJqKfDvzThvLBGFX9oyX0dseiUjk57oWEuz kpBhIH7ugn29ENhszkcCWT1WoS1xmsJrke5oCylGosUqcpH3+LXC9yEY5Wvyf1r1keET sxYkzM/VTvB/bzMbq5f5Fvkq2zLenV39DZ0IfpXcO82sJZpCUgQh7QIJw3fCY/Jt8ITz gpRA== 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 h33-v6si14324923plh.483.2018.04.17.07.42.14; Tue, 17 Apr 2018 07:42:28 -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 S1753964AbeDQOkT (ORCPT + 99 others); Tue, 17 Apr 2018 10:40:19 -0400 Received: from resqmta-ch2-10v.sys.comcast.net ([69.252.207.42]:44924 "EHLO resqmta-ch2-10v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753051AbeDQOkR (ORCPT ); Tue, 17 Apr 2018 10:40:17 -0400 Received: from resomta-ch2-03v.sys.comcast.net ([69.252.207.99]) by resqmta-ch2-10v.sys.comcast.net with ESMTP id 8RmGfWYUyKdwr8RmKf3UEB; Tue, 17 Apr 2018 14:40:16 +0000 Received: from gentwo.org ([98.222.162.64]) by resomta-ch2-03v.sys.comcast.net with SMTP id 8RmJfGYCpmGmd8RmJfmoSm; Tue, 17 Apr 2018 14:40:16 +0000 Received: by gentwo.org (Postfix, from userid 1001) id 1FA481161681; Tue, 17 Apr 2018 09:40:15 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id 1D2631160172; Tue, 17 Apr 2018 09:40:15 -0500 (CDT) Date: Tue, 17 Apr 2018 09:40:15 -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: MS4wfGha4BouoXvpKSvFXGW1w1uR3Qo9t68nvj95H0DOd1TMeuSMS1n82JS7oELaSztneYEgeJGKtQld4RLNiv+TyKlyhDjnttkolSBnQ4HrC7preNUvEHzr p6WXnOoqx8UrEYQJvwRPNYUguuP+e5QBDGMcnqTkEbUi+XAT5pYGiw/NAvmMff07ZLgG8SVXOhcCpDuos1G+4VxSFw7ONhGc/z1eVwUbJiENNiisF2KM4qH6 E/2JdlvZzFZVqJJlqku89Nsdj8pY+ROYGnoctNDE66Gf+3MJUR672WFZ/GcTbiHERebP4H6nBb6o5h169wJMBZw+qi3Pa+g+ZypxWQs2PbC05GT5XIMCORHV s0YEGLM73G4ktJTZETigAMtQcDBIwMWNDJ9CSXiC8cqQl2d+TpDca3sDKFvYEbVW2Ldy5jzjZHvPxgcsIh7EKeSr6l4uYMo3Mbl3CtoQvK//xQ4I1w7hDyXS fbcRx9ISef3JUMm3 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?