lkml.org 
[lkml]   [2009]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: remap allocator for per-CPU memory
> I couldn't find anything explicitly prohibiting PMD/PTE aliases w/
> different attributes although there are plenty of warnings and don'ts
> against giving different attributes to the same linear addresses. At
> any rate, it definitely looks way too dangerous to depend on.

It is. We've had data corruption because of this in the past.
Worse it's very subtle data corruption, taking a long time
to track down. So yes it's definitely dangerous.
>
> And, set_memory_*() is basically allowed on any memory allocated via
> get_free_page(), so... we're between rock and hard place. Looks like

The x86-64 kernel has the text mapping alias which had similar problems.
That was avoided by special casing this.

> remapping partially using large pages is no go.

I'm not sure it was ever a good idea because most CPUs have much less
large TLB entries than small entries.
(in some cases the difference is dramatic, a few older cores
only had something like 4 2/4MB entries)
Unless it's really a lot of memory you're talking about here
it's probably better to use small pages for such specific
purposes.

The other issue is that with 1GB pages used in the direct mapping
the problem generally gets much worse. Although luckily it only
hits because there is some dumb kernel code which always forces
smaller pages for GB 0 and 4.

-Andi
--
ak@linux.intel.com -- Speaking for myself only.


\
 
 \ /
  Last update: 2009-05-13 13:43    [from the cache]
©2003-2011 Jasper Spaans