From: Jason Wang <jasowang@redhat.com>
To: Pankaj Gupta <pagupta@redhat.com>
Cc: mst@redhat.com, kvm@vger.kernel.org,
virtualization@lists.linux-foundation.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] vhost: lockless enqueuing
Date: Tue, 26 Apr 2016 15:05:20 +0800 [thread overview]
Message-ID: <571F1330.7030504@redhat.com> (raw)
In-Reply-To: <2033086948.46236145.1461651858100.JavaMail.zimbra@redhat.com>
On 04/26/2016 02:24 PM, Pankaj Gupta wrote:
> Hi Jason,
>
> Overall patches look good. Just one doubt I have is below:
>> We use spinlock to synchronize the work list now which may cause
>> unnecessary contentions. So this patch switch to use llist to remove
>> this contention. Pktgen tests shows about 5% improvement:
>>
>> Before:
>> ~1300000 pps
>> After:
>> ~1370000 pps
>>
>> Signed-off-by: Jason Wang <jasowang@redhat.com>
>> ---
>> drivers/vhost/vhost.c | 52
>> +++++++++++++++++++++++++--------------------------
>> drivers/vhost/vhost.h | 7 ++++---
>> 2 files changed, 29 insertions(+), 30 deletions(-)
[...]
>> - if (work) {
>> + node = llist_del_all(&dev->work_list);
>> + if (!node)
>> + schedule();
>> +
>> + node = llist_reverse_order(node);
> Can we avoid llist reverse here?
>
Probably not, this is because:
- we should process the work exactly the same order as they were queued,
otherwise flush won't work
- llist can only add a node to the head of list.
Thanks
next prev parent reply other threads:[~2016-04-26 7:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-26 2:14 [PATCH 1/2] vhost: simplify work flushing Jason Wang
2016-04-26 2:14 ` [PATCH 2/2] vhost: lockless enqueuing Jason Wang
2016-04-26 6:24 ` Pankaj Gupta
2016-04-26 7:05 ` Jason Wang [this message]
2016-04-26 7:57 ` Pankaj Gupta
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=571F1330.7030504@redhat.com \
--to=jasowang@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pagupta@redhat.com \
--cc=virtualization@lists.linux-foundation.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 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).