Re: virtio: put last_used and last_avail index into ring itself.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Michael S. Tsirkin
Date: Tuesday, May 4, 2010 - 11:22 am

> virtio: put last_used and last_avail index into ring itself.

I've been looking at this patch some more (more on why
later), and I wonder: would it be better to add some
alignment to the last used index address, so that
if we later add more stuff at the tail, it all
fits in a single cache line?

We use a new feature bit anyway, so layout change should not be
a problem.

Since I raised the question of caches: for used ring,
the ring is not aligned to 64 bit, so on CPUs with 64 bit
or larger cache lines, used entries will often cross
cache line boundaries. Am I right and might it
have been better to align ring entries to cache line boundaries?

What do you think?

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: virtio: put last_used and last_avail index into ring i ..., Michael S. Tsirkin, (Tue May 4, 11:22 am)
Re: virtio: put last_used and last_avail index into ring i ..., Michael S. Tsirkin, (Wed May 5, 11:27 pm)
Re: virtio: put last_used and last_avail index into ring i ..., Michael S. Tsirkin, (Sun May 9, 1:57 am)