lkml.org 
[lkml]   [2003]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 2.5.62-mm3] objrmap fix for X

--On Tuesday, February 25, 2003 15:46:26 -0600 Dave McCracken
<dmccr@us.ibm.com> wrote:

>> Keep the flag for now, find the escaped page under X, remove the flag
>> later?
>
> It occurred to me I'm already using (abusing?) the flag for nonlinear
> pages, so I have to keep it. I'll chase solutions for X.

Ok, the vm_ops->nopage function is set in drivers like drm and agp. I
don't think it's reasonable to require all of them to set PageAnon. So
here's a patch that tests the page on do_no_page and sets the flag
appropriately.

Dave McCracken
--- 2.5.62-mm3/mm/memory.c 2003-02-25 11:40:38.000000000 -0600
+++ 2.5.62-mm3-new/mm/memory.c 2003-02-25 15:54:51.000000000 -0600
@@ -1325,6 +1325,10 @@
if (!pte_chain)
goto oom;

+ /* See if nopage returned an anon page */
+ if (!new_page->mapping || PageSwapCache(new_page))
+ SetPageAnon(new_page);
+
/*
* Should we do an early C-O-W break?
*/
\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.074 / U:3.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site