From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: block: DMA alignment of IO buffer allocated from slab To: Bart Van Assche , Ming Lei , Vitaly Kuznetsov Cc: 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 References: <20180920063129.GB12913@lst.de> <87h8ij0zot.fsf@vitty.brq.redhat.com> <20180923224206.GA13618@ming.t460p> <38c03920-0fd0-0a39-2a6e-70cd8cb4ef34@virtuozzo.com> <20a20568-5089-541d-3cee-546e549a0bc8@acm.org> <12eee877-affa-c822-c9d5-fda3aa0a50da@virtuozzo.com> <1537801706.195115.7.camel@acm.org> <1537804720.195115.9.camel@acm.org> From: Andrey Ryabinin Message-ID: <10c706fd-2252-f11b-312e-ae0d97d9a538@virtuozzo.com> Date: Mon, 24 Sep 2018 19:07:18 +0300 MIME-Version: 1.0 In-Reply-To: <1537804720.195115.9.camel@acm.org> Content-Type: text/plain; charset=UTF-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: On 09/24/2018 06:58 PM, Bart Van Assche wrote: > On Mon, 2018-09-24 at 18:52 +0300, Andrey Ryabinin wrote: >> Yes, with CONFIG_DEBUG_SLAB=y, CONFIG_SLUB_DEBUG_ON=y kmalloc() guarantees >> that result is aligned on ARCH_KMALLOC_MINALIGN boundary. > > Had you noticed that Vitaly Kuznetsov showed that this is not the case? See > also https://lore.kernel.org/lkml/87h8ij0zot.fsf@vitty.brq.redhat.com/. > I'm not following. On x86-64 ARCH_KMALLOC_MINALIGN is 8, all pointers that Vitaly Kuznetsov showed are 8-byte aligned. > Thanks, > > Bart. >