[PATCH 2.5.62-mm3] objrmap fix for X

Dave McCracken (dmccr@us.ibm.com)
Tue, 25 Feb 2003 17:02:54 -0600


--==========2135142778==========
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--==========2135142778==========
Content-Type: text/plain; charset=us-ascii; name="objfix-2.5.62-mm3-1.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="objfix-2.5.62-mm3-1.diff"; size=362

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

--==========2135142778==========--

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