lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <d364733c0903182004p56aefff7ybb2786fc0dc4d40@mail.gmail.com>
Date:	Thu, 19 Mar 2009 11:04:13 +0800
From:	谢纲 <xiegang112@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: The meaning of new_batch in Linux AS I/O scheduler

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ