Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp323475ybe; Tue, 3 Sep 2019 23:42:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqy2xg/034jb9WbgneXOv/6MjI8FOxMjHDF6gylXCww+g+asc2JAe7f/AkDwv4cgJi5YZE3l X-Received: by 2002:a17:902:9347:: with SMTP id g7mr4101842plp.0.1567579323208; Tue, 03 Sep 2019 23:42:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567579323; cv=none; d=google.com; s=arc-20160816; b=SRpTX4nNxnlqINsP7hANlT35YZvkGbymPD9uR9Mlo3Ckn7FjtI/eYlaG8uCgeF0cy3 Ym0O8hAXi6KwBfnCd+ltf1lFBJgXYr7F22bgIPUcuKDa//rq+eniwat/LLA7oI1O96Qg e5ySrTm1wV5uWSv6bjPrIYN5SfR11IMEefVOAFIcosVLikCAtVM2SNcDz3Tgc1uMgPCO 8/i3/4pleNrGCpOAwn5OSk30a8BsJi5hzds6jbDiKGPl4U+cAMaEgP4VWcnMMsGwKJLw 6AkaOgPGvYwIn3LdBVw6PNpkrAb88+WENPyT3SuInZNNEPIFO7WF4gReew5MRFTOsKui 8NCg== 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:message-id:subject:cc :to:from:date; bh=poQ70XU1jmwGsp2xzPlV5P6vvZEO3UHd5sPzl8X7p/c=; b=oAhWxwcwPng+2HRd0BlOejBdoFK5KVNW0I/BPVY3YtB1aBkqfWXPCpcu1dA2ho2oZy uUD1QoZmj+HVL3E2yn1HCi6bjQ4g6ni1jCmmbMNFaWuaS21wJmC546SSychXStGOnpum TTzC3kofoNeBcqt189zEFKBHyonuBG/zy53kRrMVy0MCDJITHar0DjdPFFL/Sl3qAKiv KLUDsvr4bOY+wecICDzxN7K0S+oOZcWtNPL+OPwSpG5rYx/UhxXZM+PnkV3JqbcDYYJD K/VpJgdh6OgOX/ybd0KM07SLNOxc/r75qwlVDl0DJ1kfN5jXpDo9yhdUWOhcqMOIHJ7R nn0A== 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 d9si16280294pgv.577.2019.09.03.23.41.47; Tue, 03 Sep 2019 23:42:03 -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 S1728601AbfIDGlA (ORCPT + 99 others); Wed, 4 Sep 2019 02:41:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54784 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726004AbfIDGlA (ORCPT ); Wed, 4 Sep 2019 02:41:00 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9D48E315C006; Wed, 4 Sep 2019 06:40:59 +0000 (UTC) Received: from ming.t460p (ovpn-8-23.pek2.redhat.com [10.72.8.23]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C585C60BFB; Wed, 4 Sep 2019 06:40:48 +0000 (UTC) Date: Wed, 4 Sep 2019 14:40:44 +0800 From: Ming Lei To: Christoph Hellwig Cc: Matthew Wilcox , Christopher Lameter , Michal Hocko , Vlastimil Babka , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Pekka Enberg , David Rientjes , Dave Chinner , "Darrick J . Wong" , 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) Message-ID: <20190904064043.GA7578@ming.t460p> 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> <0100016cf8c3033d-bbcc9ba3-2d59-4654-a7c2-8ba094f8a7de-000000@email.amazonses.com> <20190903205312.GK29434@bombadil.infradead.org> <20190904051933.GA10218@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190904051933.GA10218@lst.de> User-Agent: Mutt/1.11.3 (2019-02-01) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Wed, 04 Sep 2019 06:41:00 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 04, 2019 at 07:19:33AM +0200, Christoph Hellwig wrote: > On Tue, Sep 03, 2019 at 01:53:12PM -0700, Matthew Wilcox wrote: > > > 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. > > > > Are you telling me nobody uses the ramdisk driver on fedora? Because > > that's one of the affected drivers. > > For pmem/brd misaligned memory alone doesn't seem to be the problem. > Misaligned memory that cross a page barrier is. And at least XFS > before my log recovery changes only used kmalloc for smaller than > page size allocation, so this case probably didn't hit. BTW, does sl[aou]b guarantee that smaller than page size allocation via kmalloc() won't cross page boundary any time? Thanks, Ming