[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1288849126.12932.4.camel@localhost.localdomain>
Date: Wed, 03 Nov 2010 22:38:46 -0700
From: Shirley Ma <mashirle@...ibm.com>
To: "Michael S. Tsirkin" <mst@...hat.com>
Cc: David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 1/1] vhost: TX used buffer guest signal accumulation
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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists