[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1515454150.2909.34.camel@wdc.com>
Date: Mon, 8 Jan 2018 23:29:11 +0000
From: Bart Van Assche <Bart.VanAssche@....com>
To: "jbacik@...com" <jbacik@...com>, "tj@...nel.org" <tj@...nel.org>,
"jack@...e.cz" <jack@...e.cz>, "clm@...com" <clm@...com>,
"axboe@...nel.dk" <axboe@...nel.dk>
CC: "kernel-team@...com" <kernel-team@...com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"peterz@...radead.org" <peterz@...radead.org>,
"linux-btrfs@...r.kernel.org" <linux-btrfs@...r.kernel.org>,
"linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
"jianchao.w.wang@...cle.com" <jianchao.w.wang@...cle.com>,
"hch@....de" <hch@....de>
Subject: Re: [PATCH 3/8] blk-mq: replace timeout synchronization with a RCU
and generation based scheme
On Mon, 2018-01-08 at 11:15 -0800, Tejun Heo wrote:
> @@ -230,6 +232,27 @@ struct request {
>
> unsigned short write_hint;
>
> + /*
> + * On blk-mq, the lower bits of ->gstate carry the MQ_RQ_* state
> + * value and the upper bits the generation number which is
> + * monotonically incremented and used to distinguish the reuse
> + * instances.
> + *
> + * ->gstate_seq allows updates to ->gstate and other fields
> + * (currently ->deadline) during request start to be read
> + * atomically from the timeout path, so that it can operate on a
> + * coherent set of information.
> + */
> + seqcount_t gstate_seq;
> + u64 gstate;
> +
> + /*
> + * ->aborted_gstate is used by the timeout to claim a specific
> + * recycle instance of this request. See blk_mq_timeout_work().
> + */
> + struct u64_stats_sync aborted_gstate_sync;
> + u64 aborted_gstate;
> +
> unsigned long deadline;
> struct list_head timeout_list;
Does "gstate" perhaps stand for "generation number and state"? If so, please
mention this in one of the above comments.
Thanks,
Bart.
Powered by blists - more mailing lists