* The meaning of new_batch in Linux AS I/O scheduler
@ 2009-03-19 3:04 谢纲
0 siblings, 0 replies; only message in thread
From: 谢纲 @ 2009-03-19 3:04 UTC (permalink / raw)
To: linux-kernel
Hi,
I'm little confused about the semantic of new_batch in Linux AS I/O scheduler.
As the comments mentioned, if it's 1, then it stands for that AS will
wait for the first read to complete. There is comments in defination:
/* 1: waiting on first read complete */
But there is another comments in as_completed_request:
/*
* Start counting the batch from when a request of that direction is
* actually serviced. This should help devices with big TCQ windows
* and writeback caches
*/
if (ad->new_batch && ad->batch_data_dir == rq_is_sync(rq)) {
update_write_batch(ad);
ad->current_batch_expires = jiffies +
ad->batch_expire[REQ_SYNC];
ad->new_batch = 0;
}
>From this comments and code, it seems that, new_batch does not only
work for read batch but also work for write batch, which conflicts
with the comments in defination. If it's only used when read batching,
why do we need to check the batch dir: ad->batch_data_dir ==
rq_is_sync(rq) (now, we are definitely in read batching ).
Thanks
--
Xie Gang
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-03-19 3:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-19 3:04 The meaning of new_batch in Linux AS I/O scheduler 谢纲
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®