From: Shirley Ma <mashirle@us.ibm.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: David Miller <davem@davemloft.net>,
netdev@vger.kernel.org, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 1/1] vhost: TX used buffer guest signal accumulation
Date: Wed, 03 Nov 2010 22:38:46 -0700 [thread overview]
Message-ID: <1288849126.12932.4.camel@localhost.localdomain> (raw)
In-Reply-To: <20101103104812.GB10555@redhat.com>
On Wed, 2010-11-03 at 12:48 +0200, Michael S. Tsirkin wrote:
> I mean in practice, you see a benefit from this patch?
Yes, I tested it. It does benefit the performance.
> > My concern here is whether checking only in set up would be
> sufficient
> > for security?
>
> It better be sufficient because the checks that put_user does
> are not effictive when run from the kernel thread, anyway.
>
> > Would be there is a case guest could corrupt the ring
> > later? If not, that's OK.
>
> You mean change the pointer after it's checked?
> If you see such a case, please holler.
I wonder about it, not a such case in mind.
> To clarify: the combination of __put_user and separate
> signalling is giving the same performance benefit as your
> patch?
Yes, it has similar performance, not I haven't finished all message
sizes comparison yet.
> I am mostly concerned with adding code that seems to help
> speed for reasons we don't completely understand, because
> then we might break the optimization easily without noticing.
I don't think the patch I submited would break up anything. It just
reduced the cost of per used buffer 3 put_user() calls and guest
signaling from one to one to many to one.
Thanks
Shirley
next prev parent reply other threads:[~2010-11-04 5:38 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-27 21:58 [RFC PATCH 1/1] vhost: TX used buffer guest signal accumulation Shirley Ma
2010-10-28 4:40 ` Shirley Ma
2010-10-28 5:20 ` Michael S. Tsirkin
2010-10-28 15:24 ` Shirley Ma
2010-10-28 17:14 ` Shirley Ma
2010-10-29 8:10 ` Michael S. Tsirkin
2010-10-29 15:43 ` Shirley Ma
2010-10-30 20:06 ` Michael S. Tsirkin
2010-11-01 20:17 ` Shirley Ma
2010-11-03 10:48 ` Michael S. Tsirkin
2010-11-04 5:38 ` Shirley Ma [this message]
2010-11-04 9:30 ` Michael S. Tsirkin
2010-11-04 21:37 ` Shirley Ma
2010-10-28 19:32 ` Shirley Ma
2010-10-28 20:13 ` Shirley Ma
2010-10-28 21:04 ` Sridhar Samudrala
2010-10-28 21:40 ` Shirley Ma
2010-10-29 8:11 ` Michael S. Tsirkin
2010-10-29 8:12 ` Michael S. Tsirkin
2010-10-29 8:03 ` Michael S. Tsirkin
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=1288849126.12932.4.camel@localhost.localdomain \
--to=mashirle@us.ibm.com \
--cc=davem@davemloft.net \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.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).