lkml.org 
[lkml]   [2011]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH 00/17] powerpc/e500: separate e500 from e500mc
From
Date
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.




\
 
 \ /
  Last update: 2011-11-15 23:43    [from the cache]
©2003-2011 Jasper Spaans