Re: [PATCH 10/27] aio: don't zero entire aio_kiocb aio_get_req()

2018-12-04 Thread Jens Axboe
On 12/4/18 7:49 AM, Christoph Hellwig wrote: >> -req = kmem_cache_alloc(kiocb_cachep, GFP_KERNEL|__GFP_ZERO); >> -if (unlikely(!req)) >> -return NULL; >> +req = kmem_cache_alloc(kiocb_cachep, GFP_KERNEL); >> +if (req) { >> +percpu_ref_get(>reqs); >> +

Re: [PATCH 10/27] aio: don't zero entire aio_kiocb aio_get_req()

2018-12-04 Thread Christoph Hellwig
> - req = kmem_cache_alloc(kiocb_cachep, GFP_KERNEL|__GFP_ZERO); > - if (unlikely(!req)) > - return NULL; > + req = kmem_cache_alloc(kiocb_cachep, GFP_KERNEL); > + if (req) { > + percpu_ref_get(>reqs); > + req->ki_ctx = ctx; > +

[PATCH 10/27] aio: don't zero entire aio_kiocb aio_get_req()

2018-11-30 Thread Jens Axboe
It's 192 bytes, fairly substantial. Most items don't need to be cleared, especially not upfront. Clear the ones we do need to clear, and leave the other ones for setup when the iocb is prepared and submitted. Signed-off-by: Jens Axboe --- fs/aio.c | 19 --- 1 file changed, 12