Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1160726 > unrolled thread

Re: [PATCH 5/8] cfq-iosched: remove @gfp_mask from cfq_find_alloc_queue()

Started byJeff Moyer <jmoyer@redhat.com>
First post2015-06-08 21:30 +0200
Last post2015-06-08 21:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 5/8] cfq-iosched: remove @gfp_mask from cfq_find_alloc_queue() Jeff Moyer <jmoyer@redhat.com> - 2015-06-08 21:30 +0200

#1160726 — Re: [PATCH 5/8] cfq-iosched: remove @gfp_mask from cfq_find_alloc_queue()

FromJeff Moyer <jmoyer@redhat.com>
Date2015-06-08 21:30 +0200
SubjectRe: [PATCH 5/8] cfq-iosched: remove @gfp_mask from cfq_find_alloc_queue()
Message-ID<pzaUa-8hW-7@gated-at.bofh.it>
Tejun Heo <tj@kernel.org> writes:

> 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_ATOMIC 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.

Sorry, I disagree with this patch.  You've changed it so that all cfqq
allocations are GFP_ATOMIC, and most, if not all of them simply don't
need to be.

I'll take it one step further and suggest that we should fix
cfq_find_alloc_queue to pass the gfp_mask to check_ioprio_changed.  That
also shouldn't be using GFP_ATOMIC unconditionally.

NAK

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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web