Re: Cache incoherencies

Russell King (rmk@arm.linux.org.uk)
Thu, 26 Aug 1999 20:05:43 +0100 (BST)


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).

> __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.
_____
|_____| ------------------------------------------------- ---+---+-
| | Russell King rmk@arm.linux.org.uk --- ---
| | | | http://www.arm.linux.org.uk/~rmk/aboutme.html / / |
| +-+-+ --- -+-
/ | THE developer of ARM Linux |+| /|\
/ | | | --- |
+-+-+ ------------------------------------------------- /\\\ |

-
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/