From: piaojun <piaojun@huawei.com>
To: Dominique Martinet <asmadeus@codewreck.org>
Cc: "akpm@linux-foundation.org" <akpm@linux-foundation.org>,
<ericvh@gmail.com>, <rminnich@sandia.gov>, <lucho@ionkov.net>,
<v9fs-developer@lists.sourceforge.net>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [V9fs-developer] [PATCH] net/9p/client.c: fix misuse of spin_lock_irqsave for p9_client lock
Date: Mon, 16 Jul 2018 09:26:47 +0800 [thread overview]
Message-ID: <5B4BF457.2070905@huawei.com> (raw)
In-Reply-To: <20180712070122.GB7639@nautica>
Hi Dominique,
On 2018/7/12 15:01, Dominique Martinet wrote:
> piaojun wrote on Thu, Jul 12, 2018:
>> In p9_read_work(), we use spin_lock for client->lock, but misuse
>> spin_lock_irqsave for it in p9_fid_create(). As p9_client lock won't be
>> locked in irq context, so spin_lock is enough. And that will improve the
>> performance.
>
> Agreed on principle, see remark below
>
>> Signed-off-by: Jun Piao <piaojun@huawei.com>
>> ---
>> net/9p/client.c | 17 +++++++----------
>> net/9p/trans_fd.c | 7 +++----
>> 2 files changed, 10 insertions(+), 14 deletions(-)
>>
>> diff --git a/net/9p/client.c b/net/9p/client.c
>> index 8bc8b3e..b05cbfc 100644
>> --- a/net/9p/client.c
>> +++ b/net/9p/client.c
>> @@ -260,7 +260,6 @@ static struct p9_fcall *p9_fcall_alloc(int alloc_msize)
>> static struct p9_req_t *
>> p9_tag_alloc(struct p9_client *c, u16 tag, unsigned int max_size)
>> {
>> - unsigned long flags;
>> int row, col;
>> struct p9_req_t *req;
>> int alloc_msize = min(c->msize, max_size);
>> @@ -270,7 +269,7 @@ static struct p9_fcall *p9_fcall_alloc(int alloc_msize)
>> tag++;
>>
>> if (tag >= c->max_tag) {
>> - spin_lock_irqsave(&c->lock, flags);
>> + spin_lock(&c->lock);
>
> This code doesn't exist anymore with Matthew's idr rework, could you
> submit that patch based on top of my 9p-next branch?
> (unless you really want Andrew to take this for the next 4.18-rc, but
> I'm not convinced this qualifies)
OK, I will rebase my patch and resend later.
Thanks,
Jun
>
> Please see my "Current 9P patches - test branch" for details:
> https://sourceforge.net/p/v9fs/mailman/message/36365359/
>
prev parent reply other threads:[~2018-07-16 1:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-12 6:31 piaojun
2018-07-12 7:01 ` [V9fs-developer] " Dominique Martinet
2018-07-16 1:26 ` piaojun [this message]
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=5B4BF457.2070905@huawei.com \
--to=piaojun@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=asmadeus@codewreck.org \
--cc=ericvh@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lucho@ionkov.net \
--cc=rminnich@sandia.gov \
--cc=v9fs-developer@lists.sourceforge.net \
/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
Powered by JetHome