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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 5 May 2010 08:01:11 -0700
From:	"Michael Chan" <mchan@...adcom.com>
To:	"'Eric Dumazet'" <eric.dumazet@...il.com>
cc:	"davem@...emloft.net" <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH -next 2/3] bnx2: Add prefetches to rx path.

Eric Dumazet wrote:

> > @@ -3097,7 +3099,11 @@ bnx2_rx_int(struct bnx2 *bp, struct
> bnx2_napi *bnapi, int budget)
> >
> >             rx_buf = &rxr->rx_buf_ring[sw_ring_cons];
> >             skb = rx_buf->skb;
> > +           prefetch(skb);
>
> why not a prefetchw() ?

Yes, didn't know there was a prefetchw() before you pointed it
out.

>
> >
> > +           next_rx_buf =
> > +
> &rxr->rx_buf_ring[RX_RING_IDX(NEXT_RX_BD(sw_cons))];
> > +           prefetch(next_rx_buf->desc);
>
> So cpu is allowed to start a memory transaction on
> next_skb->data, while
> not yes DMA unmapped ?

Very good point.  The prefetch() will not work and will be
wasted on systems that have pci_dma_sync_...() defined.  I
think we can skip the prefetch if pci_dma_sync_...() is
defined.  The logic to determine if the next descriptor is
ready, dma_sync it, and prefetch it will be complicated and
we may end up not gaining any performance in the end.

What do you think?  Thanks.


--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ