lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181226100341-mutt-send-email-mst@kernel.org>
Date:   Wed, 26 Dec 2018 10:06:59 -0500
From:   "Michael S. Tsirkin" <mst@...hat.com>
To:     Jason Wang <jasowang@...hat.com>
Cc:     netdev@...r.kernel.org
Subject: Re: thoughts stac/clac and get user for vhost

On Wed, Dec 26, 2018 at 12:03:50PM +0800, Jason Wang wrote:
> 
> On 2018/12/26 上午12:41, Michael S. Tsirkin wrote:
> > Hi!
> > I was just wondering: packed ring batches things naturally.
> > E.g.
> > 
> > user_access_begin
> > check descriptor valid
> > smp_rmb
> > copy descriptor
> > user_access_end
> 
> 
> But without speculation on the descriptor (which may only work for in-order
> or even a violation of spec). Only one two access of a single descriptor
> could be batched. For split ring, we can batch more since we know how many
> descriptors is pending. (avail_idx - last_avail_idx).
> 
> Anything I miss?
> 
> Thanks
> 

just check more descriptors in a loop:

 user_access_begin
 for (i = 0; i < 16; ++i) {
	 if (!descriptor valid)
		break;
	 smp_rmb
	 copy descriptor
 }
 user_access_end

you don't really need to know how many there are
ahead of the time as you still copy them 1 by one.


> > 
> > So packed layout should show the gain with this approach.
> > That could be motivation enough to finally enable vhost packed ring
> > support.
> > 
> > Thoughts?
> > 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ