From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Gunthorpe Subject: Re: [PATCH 0/4] IB: decrease large contigous allocation Date: Wed, 26 Sep 2018 11:06:55 -0600 Message-ID: <20180926170655.GC16163@ziepe.ca> References: <1537275826-27247-1-git-send-email-jan.dakinevich@virtuozzo.com> <20180918144623.GI11367@ziepe.ca> <20180926184809.5d37cdb7@virtuozzo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20180926184809.5d37cdb7@virtuozzo.com> Sender: linux-kernel-owner@vger.kernel.org To: Jan Dakinevich Cc: Doug Ledford , Yishai Hadas , Leon Romanovsky , Parav Pandit , Mark Bloch , Daniel Jurgens , Kees Cook , Kamal Heib , Bart Van Assche , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, Denis Lunev , Konstantin Khorenko List-Id: linux-rdma@vger.kernel.org On Wed, Sep 26, 2018 at 06:48:09PM +0300, Jan Dakinevich wrote: > On Tue, 18 Sep 2018 08:46:23 -0600 > Jason Gunthorpe wrote: > > > On Tue, Sep 18, 2018 at 04:03:42PM +0300, Jan Dakinevich wrote: > > > The size of mlx4_ib_device became too large to be allocated as > > > whole contigous block of memory. Currently it takes about 55K. On > > > architecture with 4K page it means 3rd order. > > > > > > This patch series makes an attempt to split mlx4_ib_device into > > > several parts and allocate them with less expensive kvzalloc > > > > Why split it up? Any reason not to just allocate the whole thing with > > kvzalloc? > > > > To allocate whole ib_device with kvmalloc I will need replace kzalloc() > by kvzalloc() in ib_alloc_device() and then review allocation, to make > sure that no one uses this memory for DMA. I would be shocked if some driver was DMA'ing out of struct ib_device memory.. Jason