On Thu, Mar 21, 2013 at 09:35:38AM -0700, Kent Overstreet wrote:
> The aio code tries really hard to avoid having to deal with the completion
> ringbuffer overflowing.  To do that, it has to keep track of the number of
> outstanding kiocbs, and the number of completions currently in the
> ringbuffer - and it's got to check that every time we allocate a kiocb.
> Ouch.
> 
> But - we can improve this quite a bit if we just change reqs_active to
> mean "number of outstanding requests and unreaped completions" - that
> means kiocb allocation doesn't have to look at the ringbuffer, which is a
> fairly significant win.

Signed-off-by: "Theodore Ts'o" <[email protected]>

Could you please add a quick comment documenting the reqs_active field
in the struct kioctx definition here?  For future code
maintainability, it should be documented in fs/aio.c, not just in a
commit description.

>  struct kioctx {
>       atomic_t                users;
>       atomic_t                dead;
> @@ -92,7 +86,13 @@ struct kioctx {
>       atomic_t                reqs_active;
>       struct list_head        active_reqs;    /* used for cancellation */

                                                   - Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to