[RFC 6/8] Account for pages in the page cache in terms of base pages



Variable Order Page Cache: Account for higher order pages

NR_FILE_PAGES now counts pages of different order. Maybe we need to
account in base page sized pages? If so then we need to change
the way we update the counters. Note that the same would have to be
done for other counters.

Signed-off-by: Christoph Lameter <clameter@xxxxxxx>


---
mm/filemap.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

Index: linux-2.6.21-rc7/mm/filemap.c
===================================================================
--- linux-2.6.21-rc7.orig/mm/filemap.c 2007-04-19 09:11:13.000000000 -0700
+++ linux-2.6.21-rc7/mm/filemap.c 2007-04-19 09:14:16.000000000 -0700
@@ -119,7 +119,8 @@ void __remove_from_page_cache(struct pag
radix_tree_delete(&mapping->page_tree, page->index);
page->mapping = NULL;
mapping->nrpages--;
- __dec_zone_page_state(page, NR_FILE_PAGES);
+ __mod_zone_page_state(page_zone(page), NR_FILE_PAGES,
+ -(1 << mapping->order));
}

void remove_from_page_cache(struct page *page)
@@ -448,7 +449,8 @@ int add_to_page_cache(struct page *page,
page->mapping = mapping;
page->index = offset;
mapping->nrpages++;
- __inc_zone_page_state(page, NR_FILE_PAGES);
+ __mod_zone_page_state(page_zone(page), NR_FILE_PAGES,
+ 1 << mappig->order);
}
write_unlock_irq(&mapping->tree_lock);
radix_tree_preload_end();
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: Account Forms
    ... BCM sometimes has what's known as a "forms cache" problem. ... The bulk of the forms cache issues in Outlook 2003 are fixed in Service Pack ... > to refigure the account form. ... > I go to the account form now, it's part of the form I was attempting to ...
    (microsoft.public.outlook.program_forms)
  • Re: W2K domain account lockouts... not the obvious
    ... out - it will move on to the next account. ... > * Users are not logged in at multpile workstations. ... > * A couple drives to local servers on our domain ... The counters increase at the same time ...
    (microsoft.public.win2000.security)
  • Re: IIS/ASP.NET impersonation probelm
    ... sources and perf counters during the initial deployment of your application. ... checked anonymus access and integrated windows authentication ... i used following account as my anonymus account ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: My profile changed - HELP!
    ... login using my domain account and password and clicking Remember my password. ... This seems to have put in in the cache ahead of the service account so when ... My profile is correct. ... Sharepoint thinks I'm someone else. ...
    (microsoft.public.sharepoint.portalserver)
  • Re: Spyware in Content.IES
    ... believe* have to be deleted from within each user account one by one. ... > wanted to create a cache. ... > you use FAT32 the cluster size increases as the size of the disk partition ... > actually consume 32KB of disk space. ...
    (microsoft.public.windowsxp.security_admin)