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/