* [PATCH] blk-throttle: use READ/WRITE directly
@ 2013-10-16 10:56 Hong Zhiguo
[not found] ` <1381921012-12114-1-git-send-email-zhiguohong-1Nz4purKYjRBDgjK7y7TUQ@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Hong Zhiguo @ 2013-10-16 10:56 UTC (permalink / raw)
To: tj-DgEjT+Ai2ygdnm+yROfE0A
Cc: vgoyal-H+wXaHxf7aLQT0dZR+AlfA, cgroups-u79uwXL29TY76Z2rM5mHXA,
Hong Zhiguo
From: Hong Zhiguo <zhiguohong-1Nz4purKYjRBDgjK7y7TUQ@public.gmane.org>
To save some instructions
Signed-off-by: Hong Zhiguo <zhiguohong-1Nz4purKYjRBDgjK7y7TUQ@public.gmane.org>
---
block/blk-throttle.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index 8331aba..f4fb859 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -1120,7 +1120,7 @@ static int throtl_dispatch_tg(struct throtl_grp *tg)
while ((bio = throtl_peek_queued(&sq->queued[READ])) &&
tg_may_dispatch(tg, bio, NULL)) {
- tg_dispatch_one_bio(tg, bio_data_dir(bio));
+ tg_dispatch_one_bio(tg, READ);
nr_reads++;
if (nr_reads >= max_nr_reads)
@@ -1130,7 +1130,7 @@ static int throtl_dispatch_tg(struct throtl_grp *tg)
while ((bio = throtl_peek_queued(&sq->queued[WRITE])) &&
tg_may_dispatch(tg, bio, NULL)) {
- tg_dispatch_one_bio(tg, bio_data_dir(bio));
+ tg_dispatch_one_bio(tg, WRITE);
nr_writes++;
if (nr_writes >= max_nr_writes)
@@ -1605,9 +1605,9 @@ static void tg_drain_bios(struct throtl_service_queue *parent_sq)
throtl_dequeue_tg(tg);
while ((bio = throtl_peek_queued(&sq->queued[READ])))
- tg_dispatch_one_bio(tg, bio_data_dir(bio));
+ tg_dispatch_one_bio(tg, READ);
while ((bio = throtl_peek_queued(&sq->queued[WRITE])))
- tg_dispatch_one_bio(tg, bio_data_dir(bio));
+ tg_dispatch_one_bio(tg, WRITE);
}
}
--
1.8.1.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] blk-throttle: use READ/WRITE directly
[not found] ` <1381921012-12114-1-git-send-email-zhiguohong-1Nz4purKYjRBDgjK7y7TUQ@public.gmane.org>
@ 2013-10-16 13:59 ` Vivek Goyal
0 siblings, 0 replies; 2+ messages in thread
From: Vivek Goyal @ 2013-10-16 13:59 UTC (permalink / raw)
To: Hong Zhiguo
Cc: tj-DgEjT+Ai2ygdnm+yROfE0A, cgroups-u79uwXL29TY76Z2rM5mHXA,
Hong Zhiguo
On Wed, Oct 16, 2013 at 06:56:52PM +0800, Hong Zhiguo wrote:
> From: Hong Zhiguo <zhiguohong-1Nz4purKYjRBDgjK7y7TUQ@public.gmane.org>
>
> To save some instructions
>
I am not sure if this change is worth doing or not. But ofcourse it
is simple enough.
Acked-by: Vivek Goyal <vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Vivek
> Signed-off-by: Hong Zhiguo <zhiguohong-1Nz4purKYjRBDgjK7y7TUQ@public.gmane.org>
> ---
> block/blk-throttle.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/block/blk-throttle.c b/block/blk-throttle.c
> index 8331aba..f4fb859 100644
> --- a/block/blk-throttle.c
> +++ b/block/blk-throttle.c
> @@ -1120,7 +1120,7 @@ static int throtl_dispatch_tg(struct throtl_grp *tg)
> while ((bio = throtl_peek_queued(&sq->queued[READ])) &&
> tg_may_dispatch(tg, bio, NULL)) {
>
> - tg_dispatch_one_bio(tg, bio_data_dir(bio));
> + tg_dispatch_one_bio(tg, READ);
> nr_reads++;
>
> if (nr_reads >= max_nr_reads)
> @@ -1130,7 +1130,7 @@ static int throtl_dispatch_tg(struct throtl_grp *tg)
> while ((bio = throtl_peek_queued(&sq->queued[WRITE])) &&
> tg_may_dispatch(tg, bio, NULL)) {
>
> - tg_dispatch_one_bio(tg, bio_data_dir(bio));
> + tg_dispatch_one_bio(tg, WRITE);
> nr_writes++;
>
> if (nr_writes >= max_nr_writes)
> @@ -1605,9 +1605,9 @@ static void tg_drain_bios(struct throtl_service_queue *parent_sq)
> throtl_dequeue_tg(tg);
>
> while ((bio = throtl_peek_queued(&sq->queued[READ])))
> - tg_dispatch_one_bio(tg, bio_data_dir(bio));
> + tg_dispatch_one_bio(tg, READ);
> while ((bio = throtl_peek_queued(&sq->queued[WRITE])))
> - tg_dispatch_one_bio(tg, bio_data_dir(bio));
> + tg_dispatch_one_bio(tg, WRITE);
> }
> }
>
> --
> 1.8.1.2
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-16 13:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-16 10:56 [PATCH] blk-throttle: use READ/WRITE directly Hong Zhiguo
[not found] ` <1381921012-12114-1-git-send-email-zhiguohong-1Nz4purKYjRBDgjK7y7TUQ@public.gmane.org>
2013-10-16 13:59 ` Vivek Goyal
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.