Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2462404ybe; Tue, 3 Sep 2019 13:15:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqwtH/vaxoFfckvZGir6DpeEJAnURr/Ovt2fVpay6tjtV6KAd8RRfIDSp+4bts/WKp5fijMO X-Received: by 2002:a62:7790:: with SMTP id s138mr40601210pfc.243.1567541746772; Tue, 03 Sep 2019 13:15:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567541746; cv=none; d=google.com; s=arc-20160816; b=G8+ByrpyBaxJ/c8N0E4TH0kOv6VSK8/PCVuCs8Tpo4VjcgxtxB5RZNrsS2ZWC5P2F3 OSNalRHUfrlzGhnl8BbtN0WtlifyVz98Y6ZfRMJDI37PPIvV0m7Cg0Bqe4BQ0CYXcgkQ zQo/foQ4Sfh6sMaf8G4XLY9t2+3Q44CyT4qFp9Q+agJ2UbCe8cU4rf2ahslz5hlk4c9M u9pEbiKAhItZbbPwGgIXrHy0bQipbu6euu19po2ETpB2OkPM8aqrzd4PJ3a+5DEHRoVH bRiig+Mll7viGtmkVNmv/iD23EbZxXLJGEhFatUzsLyqnCLcqzAe4a0FaWfzU1LmkDQF d3vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:feedback-id:mime-version:user-agent :references:message-id:in-reply-to:subject:cc:to:from:date :dkim-signature; bh=8+udDVTipUmp+83YMbfVwpc4tkFVaLom+M+qJ2jr6pc=; b=KMsiCf8pMtISK4R8dSb5aqVwbgrlIGDb2jUYMsRKUfkgbS+46LvHfZhGX7nCpwotu+ BNTb6+0e2kNuL6M6yViO+0LMWRRERbPBJ/cX2XYUfkKxp0/SjlAydLlDeav4FKAtsY2+ 2t6nIfBgWimawkCl/NGFbowPJn97EnzLItxJ3ZIW/q/mUxCWNJWB76zi5b7/OzluwMFk miqcicLRf0bkPaDU7GdnWxaNkoQMNviB0pWfOLw5clXPL3LqcglxMY2PH50q/ZnDlDHR wPyMW99F4ECWX4+cnxvohfQPYHA0n/lBWKi75XNr3LMTV0fwY0LBSi1Nme34+SHra/oK BHRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazonses.com header.s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw header.b=Cn915Kxo; 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 ba10si2507424plb.152.2019.09.03.13.15.28; Tue, 03 Sep 2019 13:15:46 -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; dkim=pass header.i=@amazonses.com header.s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw header.b=Cn915Kxo; 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 S1727594AbfICUNt (ORCPT + 99 others); Tue, 3 Sep 2019 16:13:49 -0400 Received: from a9-36.smtp-out.amazonses.com ([54.240.9.36]:59984 "EHLO a9-36.smtp-out.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725882AbfICUNr (ORCPT ); Tue, 3 Sep 2019 16:13:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1567541625; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:MIME-Version:Content-Type:Feedback-ID; bh=3CTlLgcwUNm+oBDTSqVhwT6v0ROJvSsfzOlbmJ233Hs=; b=Cn915KxoRAOo3PmJZOOm/ld4evNzr6pLGhw1L27Pj4A6Fs/aZr4YyJgWGbjjuYtj jeVgNkAMHrsCuy8IfzOPqbjM31SPPbl46ewrDDjxMgWc5IdaUb6qSn4OWC/M8d9fnKh 6hQcvnAzb8uFmTKLv3L+pNjqUii1U+7KYP92y6TI= Date: Tue, 3 Sep 2019 20:13:45 +0000 From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: Matthew Wilcox cc: Michal Hocko , Vlastimil Babka , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Pekka Enberg , David Rientjes , Ming Lei , Dave Chinner , "Darrick J . Wong" , Christoph Hellwig , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, James Bottomley , linux-btrfs@vger.kernel.org Subject: Re: [PATCH v2 2/2] mm, sl[aou]b: guarantee natural alignment for kmalloc(power-of-two) In-Reply-To: <20190901005205.GA2431@bombadil.infradead.org> Message-ID: <0100016cf8c3033d-bbcc9ba3-2d59-4654-a7c2-8ba094f8a7de-000000@email.amazonses.com> References: <20190826111627.7505-1-vbabka@suse.cz> <20190826111627.7505-3-vbabka@suse.cz> <0100016cd98bb2c1-a2af7539-706f-47ba-a68e-5f6a91f2f495-000000@email.amazonses.com> <20190828194607.GB6590@bombadil.infradead.org> <20190829073921.GA21880@dhcp22.suse.cz> <0100016ce39e6bb9-ad20e033-f3f4-4e6d-85d6-87e7d07823ae-000000@email.amazonses.com> <20190901005205.GA2431@bombadil.infradead.org> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-SES-Outgoing: 2019.09.03-54.240.9.36 Feedback-ID: 1.us-east-1.fQZZZ0Xtj2+TD7V5apTT/NrT6QKuPgzCT/IC7XYgDKI=:AmazonSES Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 31 Aug 2019, Matthew Wilcox wrote: > > The current behavior without special alignment for these caches has been > > in the wild for over a decade. And this is now coming up? > > In the wild ... and rarely enabled. When it is enabled, it may or may > not be noticed as data corruption, or tripping other debugging asserts. > Users then turn off the rare debugging option. Its enabled in all full debug session as far as I know. Fedora for example has been running this for ages to find breakage in device drivers etc etc. > > If there is an exceptional alignment requirement then that needs to be > > communicated to the allocator. A special flag or create a special > > kmem_cache or something. > > The only way I'd agree to that is if we deliberately misalign every > allocation that doesn't have this special flag set. Because right now, > breakage happens everywhere when these debug options are enabled, and > the very people who need to be helped are being hurt by the debugging. That is customarily occurring for testing by adding "slub_debug" to the kernel commandline (or adding debug kernel options) and since my information is that this is done frequently (and has been for over a decade now) I am having a hard time believing the stories of great breakage here. These drivers were not tested with debugging on before? Never ran with a debug kernel?