cgroups.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Damien Le Moal <dlemoal@kernel.org>
To: Yu Kuai <yukuai1@huaweicloud.com>,
	hare@suse.de, tj@kernel.org, josef@toxicpanda.com,
	axboe@kernel.dk
Cc: cgroups@vger.kernel.org, linux-block@vger.kernel.org,
	linux-kernel@vger.kernel.org, yi.zhang@huawei.com,
	yangerkun@huawei.com, johnny.chenyi@huawei.com,
	"yukuai (C)" <yukuai3@huawei.com>
Subject: Re: [PATCH 1/6] mq-deadline: switch to use high layer elevator lock
Date: Wed, 23 Jul 2025 11:38:25 +0900	[thread overview]
Message-ID: <94ad996f-3947-493d-8ac0-5ca1c03dc9a8@kernel.org> (raw)
In-Reply-To: <9bd88c1a-2124-c244-cdc3-5cf1bd4cce11@huaweicloud.com>

On 7/23/25 11:07 AM, Yu Kuai wrote:
> Hi,
> 
> 在 2025/07/23 9:46, Damien Le Moal 写道:
>> On 7/22/25 4:24 PM, Yu Kuai wrote:
>>> From: Yu Kuai <yukuai3@huawei.com>
>>>
>>> Introduce a new spinlock in elevator_queue, and switch dd->lock to
>>> use the new lock. There are no functional changes.
>>>
>>> Signed-off-by: Yu Kuai <yukuai3@huawei.com>
>>> ---
>>>   block/elevator.c    |  1 +
>>>   block/elevator.h    |  4 ++--
>>>   block/mq-deadline.c | 57 ++++++++++++++++++++++-----------------------
>>>   3 files changed, 31 insertions(+), 31 deletions(-)
>>>
>>> diff --git a/block/elevator.c b/block/elevator.c
>>> index ab22542e6cf0..91df270d9d91 100644
>>> --- a/block/elevator.c
>>> +++ b/block/elevator.c
>>> @@ -144,6 +144,7 @@ struct elevator_queue *elevator_alloc(struct
>>> request_queue *q,
>>>       eq->type = e;
>>>       kobject_init(&eq->kobj, &elv_ktype);
>>>       mutex_init(&eq->sysfs_lock);
>>> +    spin_lock_init(&eq->lock);
>>>       hash_init(eq->hash);
>>>         return eq;
>>> diff --git a/block/elevator.h b/block/elevator.h
>>> index a07ce773a38f..cbbac4f7825c 100644
>>> --- a/block/elevator.h
>>> +++ b/block/elevator.h
>>> @@ -110,12 +110,12 @@ struct request *elv_rqhash_find(struct request_queue
>>> *q, sector_t offset);
>>>   /*
>>>    * each queue has an elevator_queue associated with it
>>>    */
>>> -struct elevator_queue
>>> -{
>>> +struct elevator_queue {
>>>       struct elevator_type *type;
>>>       void *elevator_data;
>>>       struct kobject kobj;
>>>       struct mutex sysfs_lock;
>>> +    spinlock_t lock;
>>>       unsigned long flags;
>>>       DECLARE_HASHTABLE(hash, ELV_HASH_BITS);
>>>   };
>>
>> I wonder if the above should not be its own patch, and the remaining below
>> staying in this patch as that match exactly the commit title.
> 
> I think you mean *should be it's own patch*. I don't have preference and

Yes, that is what I meant. Sorry about the typo.

> I can do that in the next version :)
> 
> Thanks,
> Kuai
> 
> 


-- 
Damien Le Moal
Western Digital Research

  reply	other threads:[~2025-07-23  2:40 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-22  7:24 [PATCH 0/6] blk-mq-sched: support request batch dispatching for sq elevator Yu Kuai
2025-07-22  7:24 ` [PATCH 1/6] mq-deadline: switch to use high layer elevator lock Yu Kuai
2025-07-23  1:46   ` Damien Le Moal
2025-07-23  2:07     ` Yu Kuai
2025-07-23  2:38       ` Damien Le Moal [this message]
2025-07-22  7:24 ` [PATCH 2/6] block, bfq: don't grab queue_lock from io path Yu Kuai
2025-07-23  1:52   ` Damien Le Moal
2025-07-23  2:04     ` Yu Kuai
2025-07-22  7:24 ` [PATCH 3/6] block, bfq: switch to use elevator lock Yu Kuai
2025-07-23  1:53   ` Damien Le Moal
2025-07-22  7:24 ` [PATCH 4/6] elevator: factor elevator lock out of dispatch_request method Yu Kuai
2025-07-23  1:59   ` Damien Le Moal
2025-07-23  2:17     ` Yu Kuai
2025-07-23  2:42       ` Damien Le Moal
2025-07-23  2:51         ` Yu Kuai
2025-07-23  4:34           ` Damien Le Moal
2025-07-23  6:10             ` Yu Kuai
2025-07-22  7:24 ` [PATCH 5/6] blk-mq-sched: refactor __blk_mq_do_dispatch_sched() Yu Kuai
2025-07-22  7:24 ` [PATCH 6/6] blk-mq-sched: support request batch dispatching for sq elevator Yu Kuai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=94ad996f-3947-493d-8ac0-5ca1c03dc9a8@kernel.org \
    --to=dlemoal@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=cgroups@vger.kernel.org \
    --cc=hare@suse.de \
    --cc=johnny.chenyi@huawei.com \
    --cc=josef@toxicpanda.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    --cc=yangerkun@huawei.com \
    --cc=yi.zhang@huawei.com \
    --cc=yukuai1@huaweicloud.com \
    --cc=yukuai3@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).