Messages in this thread Patch in this message | | | Date | Tue, 25 Feb 2003 17:02:54 -0600 | From | Dave McCracken <> | 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? */
| |