[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] xen/list: Remove prefetching



On 14.01.2020 21:35, Andrew Cooper wrote:
> Xen inherited its list infrastructure from Linux.  One area where has fallen
> behind is that of prefetching, which as it turns out is a performance penalty
> in most cases.
> 
> Prefetch of NULL on x86 is now widely measured to have glacial performance
> properties, and will unconditionally hit on every hlist use due to the
> termination condition.
> 
> Cross-port the following Linux patches:
> 
>   75d65a425c (2011) "hlist: remove software prefetching in hlist iterators"
>   e66eed651f (2011) "list: remove prefetching from regular list iterators"
>   c0d15cc7ee (2013) "linked-list: Remove __list_for_each"

Just as an observation (not an objection), the 2nd of these says
"normally the downsides are bigger than the upsides", which makes
it unbelievably clear what these supposed downsides are. I can
accept prefetches through NULL to be harmful. I can also accept
prefetches on single entry lists to not be very useful. But does
this also render them useless on long lists with not overly much
cache churn done by the body of the iteration loop? Wouldn't it
at least be worthwhile to have list_for_each_prefetch() retaining
prior behavior, and use it in places where prefetching can be
deemed to help?

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.