From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1533C4360C for ; Thu, 26 Sep 2019 13:04:23 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AFE0F222BE for ; Thu, 26 Sep 2019 13:04:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AFE0F222BE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 46DE38E000B; Thu, 26 Sep 2019 09:04:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 41D978E0001; Thu, 26 Sep 2019 09:04:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 30BA08E000B; Thu, 26 Sep 2019 09:04:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0134.hostedemail.com [216.40.44.134]) by kanga.kvack.org (Postfix) with ESMTP id 0A2DE8E0001 for ; Thu, 26 Sep 2019 09:04:23 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 6DDC48243768 for ; Thu, 26 Sep 2019 13:04:22 +0000 (UTC) X-FDA: 75977090364.04.D0ED4CA Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin04.hostedemail.com (Postfix) with ESMTP id 6A9D88000E95 for ; Thu, 26 Sep 2019 13:02:36 +0000 (UTC) X-HE-Tag: frog75_8afcf043b7a29 X-Filterd-Recvd-Size: 3999 Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by imf04.hostedemail.com (Postfix) with ESMTP for ; Thu, 26 Sep 2019 13:02:34 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 1BE7CAEAE; Thu, 26 Sep 2019 13:02:33 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 55364DA8E5; Thu, 26 Sep 2019 15:02:52 +0200 (CEST) Date: Thu, 26 Sep 2019 15:02:52 +0200 From: David Sterba To: cl@linux.com Cc: Matthew Wilcox , "Darrick J. Wong" , dsterba@suse.cz, Vlastimil Babka , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Pekka Enberg , David Rientjes , Ming Lei , Dave Chinner , Christoph Hellwig , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, James Bottomley , linux-btrfs@vger.kernel.org, Roman Gushchin , Johannes Weiner Subject: Re: [PATCH v2 2/2] mm, sl[aou]b: guarantee natural alignment for kmalloc(power-of-two) Message-ID: <20190926130252.GP2751@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, cl@linux.com, Matthew Wilcox , "Darrick J. Wong" , Vlastimil Babka , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Pekka Enberg , David Rientjes , Ming Lei , Dave Chinner , Christoph Hellwig , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, James Bottomley , linux-btrfs@vger.kernel.org, Roman Gushchin , Johannes Weiner References: <20190826111627.7505-1-vbabka@suse.cz> <20190826111627.7505-3-vbabka@suse.cz> <20190923171710.GN2751@twin.jikos.cz> <20190923175146.GT2229799@magnolia> <20190924205133.GK1855@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Sep 24, 2019 at 08:55:02PM +0000, cl@linux.com wrote: > n Tue, 24 Sep 2019, Matthew Wilcox wrote: > > > > There was a public discussion about this issue and from what I can tell > > > the outcome was that the allocator already provides what you want. Which > > > was a mechanism to misalign objects and detect these issues. This > > > mechanism has been in use for over a decade. > > > > You missed the important part, which was *ENABLED BY DEFAULT*. People > > who are enabling a debugging option to debug their issues, should not > > have to first debug all the other issues that enabling that debugging > > option uncovers! > > Why would you have to debug all other issues? You could put your patch on > top of the latest stable or distro kernel for testing. This does not work in development branches. They're based on some stable point but otherwise there's a lot of new code that usually has bugs and it's quite important be able to understand where the bug comes from. And the debugging instrumentation is there to add more sanity checks and canaries to catch overflows, assertions etc. If it's unreliable, then there's no point using it during development, IOW fix all bugs first and then see if there are more left after turning the debugging.