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

Re: [UNIKRAFT PATCH,v2,10/15] lib/ukring: Disable use of CPU prefetching



Hi Alexander,

On FreeBSD prefetch() is defined by each of the native drivers using
this ring buffer implementation. Therefore, we should just keep this as
it is and when some driver will need it then it will define it.

So we can simply drop this patch altogether.

Cheers,
Costin


On 7/21/20 6:39 PM, Alexander Jung wrote:
> Signed-off-by: Alexander Jung <alexander.jung@xxxxxxxxx>
> ---
>  lib/ukring/include/uk/ring.h | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/ukring/include/uk/ring.h b/lib/ukring/include/uk/ring.h
> index e1a0387..b51a11a 100644
> --- a/lib/ukring/include/uk/ring.h
> +++ b/lib/ukring/include/uk/ring.h
> @@ -177,7 +177,8 @@ static __inline void *
>  uk_ring_dequeue_single(struct uk_ring *r)
>  {
>    uint32_t cons_head, cons_next;
> -#ifdef PREFETCH_DEFINED
> +  /* TODO: Support CPU prefetchhing. */
> +#if 0
>    uint32_t cons_next_next;
>  #endif
>    uint32_t prod_tail;
> @@ -219,14 +220,16 @@ uk_ring_dequeue_single(struct uk_ring *r)
>    prod_tail = &r->prod_tail;
>  
>    cons_next = (cons_head + 1) & r->cons_mask;
> -#ifdef PREFETCH_DEFINED
> +  /* TODO: Support CPU prefetchhing. */
> +#if 0
>    cons_next_next = (cons_head + 2) & r->cons_mask;
>  #endif
>  
>    if (cons_head == prod_tail)
>      return NULL;
>  
> -#ifdef PREFETCH_DEFINED
> +  /* TODO: Support CPU prefetchhing. */
> +#if 0
>    if (cons_next != prod_tail) {
>      prefetch(r->ring[cons_next]);
>      if (cons_next_next != prod_tail)
> 



 


Rackspace

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