[Devel] [PATCH rh7] cfq-iosched: remove @gfp_mask from cfq_find_alloc_queue()

Maxim Patlasov mpatlasov at virtuozzo.com
Thu Oct 8 17:24:04 PDT 2015


please  ignore. will resend

On 10/08/2015 05:18 PM, Maxim Patlasov wrote:
> Backport 2da8de0bb from mainline. Original patch description:
>
>      Even when allocations fail, cfq_find_alloc_queue() always returns a
>      valid cfq_queue by falling back to the oom cfq_queue.  As such, there
>      isn't much point in taking @gfp_mask and trying "harder" if __GFP_WAIT
>      is set.  GFP_NOWAIT allocations don't fail often and even when they do
>      the degraded behavior is acceptable and temporary.
>
>      After all, the only reason get_request(), which ultimately determines
>      the gfp_mask, cares about __GFP_WAIT is to guarantee request
>      allocation, assuming IO forward progress, for callers which are
>      willing to wait.  There's no reason for cfq_find_alloc_queue() to
>      behave differently on __GFP_WAIT when it already has a fallback
>      mechanism.
>
>      Remove @gfp_mask from cfq_find_alloc_queue() and propagate the changes
>      to its callers.  This simplifies the function quite a bit and will
>      help making async queues per-cfq_group.
>
>      v2: Updated to reflect GFP_ATOMIC -> GPF_NOWAIT.
>
>      Signed-off-by: Tejun Heo <tj at kernel.org>
>      Reviewed-by: Jeff Moyer <jmoyer at redhat.com>
>      Cc: Vivek Goyal <vgoyal at redhat.com>
>      Cc: Arianna Avanzini <avanzini.arianna at gmail.com>
>      Signed-off-by: Jens Axboe <axboe at fb.com>
>
> https://jira.sw.ru/browse/PSBM-39956
> ---
>   block/cfq-iosched.c |   43 ++++++++++---------------------------------
>   1 file changed, 10 insertions(+), 33 deletions(-)




More information about the Devel mailing list