From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: block: DMA alignment of IO buffer allocated from slab To: Christoph Hellwig , Vitaly Kuznetsov Cc: Ming Lei , linux-block , linux-mm , Linux FS Devel , "open list:XFS FILESYSTEM" , Dave Chinner , Linux Kernel Mailing List , Ming Lei , Christoph Lameter References: <20180920063129.GB12913@lst.de> <87h8ij0zot.fsf@vitty.brq.redhat.com> <20180921130504.GA22551@lst.de> From: Jens Axboe Message-ID: <98996e39-7d29-354c-9009-d4b1a1bbdeb0@kernel.dk> Date: Fri, 21 Sep 2018 09:00:31 -0600 MIME-Version: 1.0 In-Reply-To: <20180921130504.GA22551@lst.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: On 9/21/18 7:05 AM, Christoph Hellwig wrote: > On Fri, Sep 21, 2018 at 03:04:18PM +0200, Vitaly Kuznetsov wrote: >> Christoph Hellwig writes: >> >>> On Wed, Sep 19, 2018 at 05:15:43PM +0800, Ming Lei wrote: >>>> 1) does kmalloc-N slab guarantee to return N-byte aligned buffer? If >>>> yes, is it a stable rule? >>> >>> This is the assumption in a lot of the kernel, so I think if somethings >>> breaks this we are in a lot of pain. >> >> It seems that SLUB debug breaks this assumption. Kernel built with >> >> CONFIG_SLUB_DEBUG=y >> CONFIG_SLUB=y >> CONFIG_SLUB_DEBUG_ON=y > > Looks like we should fix SLUB debug then.. Fully agree, it's such a fundamental property. -- Jens Axboe