Re: serial percpu_ref draining in exit_aio()

2015-03-20 Thread Jens Axboe
On 03/20/2015 12:56 PM, Jeff Moyer wrote: Jens Axboe writes: On 03/19/2015 03:27 PM, Jens Axboe wrote: On 03/19/2015 03:00 PM, Tejun Heo wrote: On Thu, Mar 19, 2015 at 04:58:33PM -0400, Jeff Moyer wrote: Do you really want to do memory allocation in the exit path? That sounds like a bad id

Re: serial percpu_ref draining in exit_aio()

2015-03-20 Thread Jeff Moyer
Jens Axboe writes: > On 03/19/2015 03:27 PM, Jens Axboe wrote: >> On 03/19/2015 03:00 PM, Tejun Heo wrote: >>> On Thu, Mar 19, 2015 at 04:58:33PM -0400, Jeff Moyer wrote: Do you really want to do memory allocation in the exit path? That sounds like a bad idea to me. (Of course, now yo

Re: serial percpu_ref draining in exit_aio()

2015-03-19 Thread Jens Axboe
On 03/19/2015 03:27 PM, Jens Axboe wrote: On 03/19/2015 03:00 PM, Tejun Heo wrote: On Thu, Mar 19, 2015 at 04:58:33PM -0400, Jeff Moyer wrote: Do you really want to do memory allocation in the exit path? That sounds like a bad idea to me. (Of course, now you're going to point out all the plac

Re: serial percpu_ref draining in exit_aio()

2015-03-19 Thread Jens Axboe
On 03/19/2015 03:00 PM, Tejun Heo wrote: On Thu, Mar 19, 2015 at 04:58:33PM -0400, Jeff Moyer wrote: Do you really want to do memory allocation in the exit path? That sounds like a bad idea to me. (Of course, now you're going to point out all the places that currently happens, right? ;-) I

Re: serial percpu_ref draining in exit_aio()

2015-03-19 Thread Tejun Heo
On Thu, Mar 19, 2015 at 04:58:33PM -0400, Jeff Moyer wrote: > Do you really want to do memory allocation in the exit path? That > sounds like a bad idea to me. (Of course, now you're going to point out > all the places that currently happens, right? ;-) I think we just need a counter there - le

Re: serial percpu_ref draining in exit_aio()

2015-03-19 Thread Jeff Moyer
Jens Axboe writes: > On 03/19/2015 11:34 AM, Tejun Heo wrote: >> Hello, >> >> So, Jens noticed that fio process exiting takes seconds when there are >> multiple aio contexts and the culprit seems to be the serial >> percpu_ref draining in exit_aio(). It's generally a bad idea to >> expose RCU la

Re: serial percpu_ref draining in exit_aio()

2015-03-19 Thread Jens Axboe
On 03/19/2015 11:34 AM, Tejun Heo wrote: Hello, So, Jens noticed that fio process exiting takes seconds when there are multiple aio contexts and the culprit seems to be the serial percpu_ref draining in exit_aio(). It's generally a bad idea to expose RCU latencies to userland because they add u