From: Malcolm Crossley <malcolm.crossley@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
keir@xen.org, stefano.stabellini@citrix.com,
Ian Campbell <ian.campbell@citrix.com>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH 2/2] grant_table: convert grant table rwlock to percpu rwlock
Date: Wed, 18 Nov 2015 11:50:50 +0000 [thread overview]
Message-ID: <564C661A.9030209@citrix.com> (raw)
In-Reply-To: <564C71EF02000078000B63D2@prv-mh.provo.novell.com>
On 18/11/15 11:41, Jan Beulich wrote:
>>>> On 18.11.15 at 12:23, <malcolm.crossley@citrix.com> wrote:
>> On 18/11/15 10:54, Jan Beulich wrote:
>>> That's not how I understood it, the rwlock isn't per-pCPU (at least not
>>> in what this patch does - it remains a per-domain one). The per-pCPU
>>> object is a pointer to an rwlock, which gets made point to whatever
>>> domain's rwlock the pCPU wants to own.
>>
>> This description is correct but it's important to note that the rwlock
>> is only used by the writers and could be effectively replaced with a
>> spinlock.
>
> While such replacement may indeed be possible (whether desirable
> is another question), I'm pretty sure I saw readers taking the read
> lock on the slow path.
>
You are right, the core code currently relies upon rw locks. Conceptually it
may not need to but that's a different question as you state. Sorry for that
mistake.
Maybe it would be clearer if we created a percpu_rwlock_t which is really a
rwlock_t. This would prevent accidental usage of the underlying rwlock_t by
new grant table code.
Malcolm
> Jan
>
next prev parent reply other threads:[~2015-11-18 11:50 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-03 17:58 [PATCH 1/2] rwlock: add per-cpu reader-writer locks Malcolm Crossley
2015-11-03 17:58 ` [PATCH 2/2] grant_table: convert grant table rwlock to percpu rwlock Malcolm Crossley
2015-11-17 17:04 ` Jan Beulich
2015-11-17 17:30 ` Andrew Cooper
2015-11-17 17:39 ` Jan Beulich
2015-11-17 17:53 ` Andrew Cooper
2015-11-18 7:45 ` Jan Beulich
2015-11-18 10:06 ` Andrew Cooper
2015-11-18 10:48 ` Jan Beulich
2015-11-18 10:36 ` Ian Campbell
2015-11-18 10:54 ` Jan Beulich
2015-11-18 11:23 ` Malcolm Crossley
2015-11-18 11:41 ` Jan Beulich
2015-11-18 11:50 ` Malcolm Crossley [this message]
2015-11-18 11:50 ` Ian Campbell
2015-11-18 11:56 ` Malcolm Crossley
2015-11-18 12:07 ` Ian Campbell
2015-11-18 13:08 ` Malcolm Crossley
2015-11-18 13:47 ` Jan Beulich
2015-11-18 14:22 ` Ian Campbell
2015-11-18 20:02 ` Konrad Rzeszutek Wilk
2015-11-19 9:03 ` Malcolm Crossley
2015-11-19 10:09 ` Andrew Cooper
2015-11-05 13:48 ` [PATCH 1/2] rwlock: add per-cpu reader-writer locks Marcos E. Matsunaga
2015-11-05 15:20 ` Malcolm Crossley
2015-11-05 15:46 ` Marcos E. Matsunaga
2015-11-17 17:00 ` Jan Beulich
2015-11-18 13:49 ` Malcolm Crossley
2015-11-18 14:15 ` Jan Beulich
2015-11-18 16:21 ` Malcolm Crossley
2015-11-18 17:04 ` Jan Beulich
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=564C661A.9030209@citrix.com \
--to=malcolm.crossley@citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=keir@xen.org \
--cc=stefano.stabellini@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.