Thread (78 messages) flat view 78 messages, 10 authors, 2011-11-16

Re: [RFC PATCH 00/17] powerpc/e500: separate e500 from e500mc

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2011-11-15 22:41:44
Also in: lkml

On Mon, 2011-11-14 at 20:36 -0600, Moffett, Kyle D wrote:
So when you are clearing a whole page, there are only 2 things you can do
wrong with "dcbz":

  (1) Call "dcbz" with an address outside of the page you want to zero.

  (2) Omit calls "dcbz" to dcbz for some physical cachelines in the page.

Now, that's a totally different story from the userspace memset() calls
that caused the problem originally, because they were frequently given
memory much smaller than a page to clear, and if you didn't know exactly
how many bytes a "dcbz" was going to clear you couldn't use it at all.
Right. That's why we pass the cache line sizes to userspace via the elf
AUX table so they don't do stupid things like that :-)
But the kernel doesn't do that anywhere, it just uses it for page clears. 
Right, so we could easily precalc the count & increment and use a "soft"
loop.

Cheers,
Ben.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help