[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1321396889.3170.13.camel@pasglop>
Date: Wed, 16 Nov 2011 09:41:29 +1100
From: Benjamin Herrenschmidt <benh@...nel.crashing.org>
To: "Moffett, Kyle D" <Kyle.D.Moffett@...ing.com>
Cc: "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
Kumar Gala <galak@...nel.crashing.org>,
Scott Wood <scottwood@...escale.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Timur Tabi <B04825@...escale.com>,
Paul Gortmaker <paul.gortmaker@...driver.com>
Subject: Re: [RFC PATCH 00/17] powerpc/e500: separate e500 from e500mc
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists