By "bypass cache" this means to use non-temporal stores to avoid polluting the cache. On x86 for instance some SSE instructions are non-allocating in the cache, and on SPARC we have block store ASIs and non-allocating (on some implementations of v9) prefetch instructions.

Typically cache-bypass stores have the side effect of displacing any lines from the cache which happen to be valid in CPU caches as the copy is performed (forcing them into the invalid state). When moving a lot of data this is preferred because the assumption is that the data won't be accessed by this CPU for awhile, if at all, so just get it out to memory and leave it there rather than leaving it in CPU caches.

- Eric

Matty wrote:

Howdy,

While reading through the source code for read():

http://cvs.opensolaris.org/source/xref/on/usr/src/uts/common/syscall/rw.c

I came across the following:

/*
    168      * Only use bypass caches when the count is large enough
    169      */
    170     if (bcount < copyout_min_size)
    171         auio.uio_extflg = UIO_COPY_CACHED;
    172     else
    173         auio.uio_extflg = UIO_COPY_DEFAULT;

    [ ..... ]

Could someone shed some light on what a bypass cache, and where the magic value 128k (value of copyout_min_size) comes from?

Thanks,
- Ryan
--
UNIX Administrator
http://daemons.net/~matty
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

--
Eric Lowe       Solaris Kernel Development     Austin, Texas
Sun Microsystems.  We make the net work.       x40577/+1(512)366-9080
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to