lkml.org 
[lkml]   [1998]   [Oct]   [29]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateThu, 29 Oct 1998 10:14:12 +0100 (CET)
FromAndrea Arcangeli <>
SubjectRe: 4MB pages and framebuffer access, x11perf results, 2.1.125
On Thu, 29 Oct 1998, MOLNAR Ingo wrote:

>
>On Wed, 28 Oct 1998, Linus Torvalds wrote:
>
>> layer how complicates it oevrmuch for little gain. The generated code was
>> fairly horrible when everything checked the 4M bit in the PMD (it's
>> actualy in the pgd, but I used the pmd macros to clean up the conceptual
>> idea). 
>
>i think the check could be done within pmd_bad() [pgd_bad()] conditions,
>which branches already exist for all relevant cases. Thus the code path
>would not differ for normal mappings. 

This was my thought too. pmd_only() would be something like:

#define	pmd_bad(x)	((pmd_val(x) & (~PAGE_MASK & ~_PAGE_USER)) !=
(_KERNPG_TABLE | _PAGE_4M))
So we can do:

if (pmd_bad(pmd))
{
	/*
	 * We usually don' t get here.
	 */
	if (pmd_only(pmd))
		copy it and break;
	else {
		clear_pte()
		...
	}
}
(i removed the global flag here but this is only an example. This way it'
s possible to do every check in the pmd_bad() path). I am _not_ going to
implement this following Linus's hint of course ;-).

Another solution could be to implement a very arch specific i386 syscall
that give us a 4 mbyte view (not allocation) of some piece of phisical
memory. Maybe is a bad idea ;-). 

Andrea Arcangeli


-
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:45    [from the cache]
©2003-2008