Received: by 2002:a4a:301c:0:0:0:0:0 with SMTP id q28-v6csp471892oof; Mon, 24 Sep 2018 23:55:58 -0700 (PDT) X-Google-Smtp-Source: ACcGV620okAkQdMn5uzQeFjB0YxHkLSU+lIp519xcQOLk/6H87IWdreDvK3a7HvC9xCXkigTiUuP X-Received: by 2002:a62:6d02:: with SMTP id i2-v6mr2156261pfc.218.1537858558480; Mon, 24 Sep 2018 23:55:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537858558; cv=none; d=google.com; s=arc-20160816; b=jZku6yM1aYXAMnuaP2b0b0Rvo+egdWVJ4ba6keNs3NE0pMFxwNgXP3k4SSSt3cUYnh 0Hv4dAHDbhCzJGpqHh7+IPNiUPpWv+uW4rdvihY05A7EHjx653cGXdCPdNhrX/MhRN3E YAx9SEYuIYTB3fdOg/6VhmFCHbam9cDXzw6OG5y0MrnAQLGLEc7URTBiuMuL5Rxhl3+W cYqn13Ja9s+YZEns8otqrZVXsY4q4xSQCeVp7QCEATR8xHPoPgJdsiyYMNdPum3WXPNv 0vu31H64ObkzoZTkYOKXzqVQSXOuODhGfRTBqN3F5MBFiMIh9AdEpqEWOfarXgmN7GsC +AdA== 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=GJbgm03guVJc693QybOZwJNf5JsJlW5tewUY2PZoerM=; b=rWBfahtBNNJ6ZGQmakxikuqsI5JNiSexQsQCU5Ymwo7kMZunY3HYrxkzI5uFAFHYBX emLVQxKEclBhitDyaPzRn2HvKpeXh0/C2tp6PbU0ba2P/6VoKbFiJczeKK1yO0opUQR8 B15CN8pv8oPMwS/Vl/tZd8g5hks9b3Int9JP6OtY+rg40TDMFMNMUKvr4n4C7DF64APC W+ZBG4IYIaH4V1ZZTOHZp5jyO1zAKBQjihyBaPp22XT5YqE2KF002TJiPqBeuLXnTcj9 BMhNcF89vQdzEpYPO9YiIIeRRPYCYYqpSyy00bSfdFbmL6CPGSaLJENYh6Y2Nvh9YZHu VNrQ== 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 m19-v6si1594970pgj.155.2018.09.24.23.55.42; Mon, 24 Sep 2018 23:55:58 -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 S1727823AbeIYNBj (ORCPT + 99 others); Tue, 25 Sep 2018 09:01:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39666 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726030AbeIYNBj (ORCPT ); Tue, 25 Sep 2018 09:01:39 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 93510369CE; Tue, 25 Sep 2018 06:55:34 +0000 (UTC) Received: from ming.t460p (ovpn-8-33.pek2.redhat.com [10.72.8.33]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6598A5C21C; Tue, 25 Sep 2018 06:55:23 +0000 (UTC) Date: Tue, 25 Sep 2018 14:55:18 +0800 From: Ming Lei To: Matthew Wilcox Cc: Bart Van Assche , Andrey Ryabinin , Vitaly Kuznetsov , Christoph Hellwig , Ming Lei , linux-block , linux-mm , Linux FS Devel , "open list:XFS FILESYSTEM" , Dave Chinner , Linux Kernel Mailing List , Jens Axboe , Christoph Lameter , Linus Torvalds , Greg Kroah-Hartman Subject: Re: block: DMA alignment of IO buffer allocated from slab Message-ID: <20180925065517.GA4868@ming.t460p> References: <1537801706.195115.7.camel@acm.org> <1537804720.195115.9.camel@acm.org> <10c706fd-2252-f11b-312e-ae0d97d9a538@virtuozzo.com> <1537805984.195115.14.camel@acm.org> <20180924185753.GA32269@bombadil.infradead.org> <20180925001615.GA14386@ming.t460p> <20180925032826.GA4110@bombadil.infradead.org> <4a19ac2f-82c1-db55-9b93-4005ace5e2fe@acm.org> <20180925044421.GA11163@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180925044421.GA11163@bombadil.infradead.org> User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 25 Sep 2018 06:55:34 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 24, 2018 at 09:44:21PM -0700, Matthew Wilcox wrote: > On Mon, Sep 24, 2018 at 09:10:43PM -0700, Bart Van Assche wrote: > > On 9/24/18 8:28 PM, Matthew Wilcox wrote: > > > [ ... ] Because if we have to > > > round all allocations below 64 bytes up to 64 bytes, [ ... ] > > Have you noticed that in another e-mail in this thread it has been explained > > why it is not necessary on x86 to align buffers allocated by kmalloc() on a > > 64-byte boundary even if these buffers are used for DMA? > > Oh, so drivers which do this only break on !x86. Yes, that'll work > out great. It shouldn't break !x86 because ARCH_KMALLOC_MINALIGN handles that. Thanks, Ming