lkml.org 
[lkml]   [1999]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Cache incoherencies
Date
From
Russell King wrote:
> Rogier Wolff writes:
> > On the other hand, having __get_free_pages allow for various
> > attributes that belong to pages would be a good idea. It should for
> > example allow you to specify that you require a DMA-able page on a PC.
> > (You're all thinking about pages below 16M, right? Good. I was talking
> > about pages below 4G for a PCI bus-mastering card...)
>
> As I said earlier, some architectures do not map the memory returned by
> get_free_pages using 'page tables'. x86 and ARM are two examples of
> architectures that don't. Therefore, you cannot set page specific bits
> on these machines.
>
> (x86 uses 4MB pages, ARM uses 1MB sections).

Say i have 12Mb RAM. So that's 3 4Mb pages. When I need an uncached
page, I'd map it into the 64M-68M range, mark that range as uncached,
and return the pointer in the 64-68M range. Now we have a "hole" in
the lower memory where we shouldn't access the memory, as it could be
cached which we didn't want for whatever reason. But the kernel should
be able to sustain that restriction...

More uncached request should preferably be satisfied from the 4M page
that we already mapped into the 64M-68M range.

Wouldn't that work?

> > __get_free_pages should call an "exception" routine when it gets "none
> > available" on a request. This will happen if no "flagged as
> > uncacheable" pages happen to be free, and the exception routine will
> > map a page uncacheable, and return that. The exception routine for
> > "normal" pages may look to see if there are any free uncached pages
> > and claim them back...
>
> This may work, but you are suggesting a recursive call to get_free_pages.
> IMHO, this is not an elegant solution.

Wether or not to recurse is an implementation issue. Computer-theory
predicts that where you seem to require recursion, you can always do
without.

Roger.

--
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
------ Microsoft SELLS you Windows, Linux GIVES you the whole house ------


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.088 / U:0.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site