Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp2031890ybn; Thu, 26 Sep 2019 06:06:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqx83c0sZi/f82k786tqLLuJJ6HAWXWU+3KjJkgaT6Qx9H+9TAAJ/WXgtDvD0Iskorz3WxT9 X-Received: by 2002:a17:906:7d0:: with SMTP id m16mr3035867ejc.95.1569503185994; Thu, 26 Sep 2019 06:06:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569503185; cv=none; d=google.com; s=arc-20160816; b=zoTnVH+5UJp46wdNuMD9mjY4oekSCrzjQ2bUHMY0uok6n0SV4LgDLHf1cqxaTTAOb9 r7QDr9XCCGjPvQ5qEbvweubhAWAbSl2f1zFyueGiPlcj97H5n0gVrRCipMizZaoDBJ4U ExQU7UgmsXdZWp6tp85Nf8Y7ee9CEQji7L4zNERAu7KySIA55EGzEXWEjqSsLI7tnGBq PdM9EVE7JAjNhNEw0eC69Ni9jqgzOUg4fimOjo9V0Cmki47QauuHp2ENwlnV8LSd8483 OvPVdHHtBb8swVyDLRKvg5NKFIKpwWUbohSK9lvmoEo6oiBfrZTivcIKHug53ux54d4a L1gA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :reply-to:message-id:subject:cc:to:from:date; bh=FGjpixKgudxTcdKTWeVAEDqXNzgZkbmYVrgjYZP7rrQ=; b=LnKJZq86WiwYnn9cs0QVqeYvwONVziE49GrK75TjOScmQ4c3MyEjAUvK5pAEi+FYUo 36F9uPFFZlx2gX4Mj7mNltEd2WXj/bwTDQo7U1iuFiAlfzjlCbbnxnce5v/bjDP9LlqW QSc+W7uPbNyig1huV8nnONkDH9gQY+jKu1E1HIeTus2umsl412A/GqUBXoBgeyayhHFS 9Bu+BMk3W+GMtr13qleguKYv3foY4aRjPAAxLkMlC+5NMOjNQ7Ved1dNDb3HK5lL+MFe WjtmaI60LH/vORt5seIuF5GarDv7KBgJaczwLHafYHVpvC5D1VJqbfr1j4WtOyhaM0HK BwQw== 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 x47si1315569eda.396.2019.09.26.06.06.01; Thu, 26 Sep 2019 06:06:25 -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 S1726700AbfIZNCg (ORCPT + 99 others); Thu, 26 Sep 2019 09:02:36 -0400 Received: from mx2.suse.de ([195.135.220.15]:45980 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725768AbfIZNCf (ORCPT ); Thu, 26 Sep 2019 09:02:35 -0400 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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.