Messages in this thread | | | From | Nikita Danilov <> | Date | Tue, 3 May 2005 15:57:41 +0400 | Subject | Re: [RFC] cleanup of use-once |
| |
Rik van Riel writes: > The special cases in the use-once code have annoyed me for a while, > and I'd like to see if replacing them with something simpler could > be worthwhile. > > I haven't actually benchmarked (or even tested) this code yet, but > the basic idea is that we want to ignore multiple references to the > same page if they happen really close to each other, and only keep > a page on the active list if it got accessed again on a time scale > that matters to the pageout code. In other words, filtering out > correlated references in a simpler way. > > Opinions ?
[...]
> - * active,unreferenced -> active,referenced > */ > void fastcall mark_page_accessed(struct page *page) > { > - if (!PageActive(page) && PageReferenced(page) && PageLRU(page)) { > - activate_page(page); > - ClearPageReferenced(page); > - } else if (!PageReferenced(page)) { > + if (!PageReferenced(page)) > SetPageReferenced(page); > - } > }
So file system pages never get to the active list? Hmm... this doesn't sound right.
> > EXPORT_SYMBOL(mark_page_accessed); > @@ -157,6 +149,7 @@ void fastcall lru_cache_add_active(struc > if (!pagevec_add(pvec, page))
[...]
> goto keep_locked; > > referenced = page_referenced(page, 1, sc->priority <= 0); > - /* In active use or really unfreeable? Activate it. */ > - if (referenced && page_mapping_inuse(page)) > + > + if (referenced) { > + /* New page. Let's see if it'll get used again... */ > + if (TestClearPageNew(page)) > + goto keep_locked; > goto activate_locked; > + }
This will screw scanning most likely: no referenced page is ever reclaimed unless lowest scanning priority is reached---this looks like sure way to oom and has capacity to increase CPU consumption significantly.
> > #ifdef CONFIG_SWAP
Nikita. - 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/
| |