Re: [Lhms-devel] [PATCH 0/7] Fragmentation Avoidance V19

Andrew Morton
2005-11-04T07:11:15Z

Paul Jackson <pj@sgi.com> wrote:
>
> > I was kind of thinking that the stats should be per-process (actually
> > per-mm) rather than bound to cpusets. /proc/<pid>/pageout-stats or something.
>
> There may well be a market for these too. But such stats sound like
> more work, and the market isn't one that's paying my salary.

But I have to care for all users.

> So I will leave that challenge on the table for someone else.

And I won't merge your patch ;)

Seriously, it does appear that doing it per-task is adequate for your
needs, and it is certainly more general.

I cannot understand why you decided to count only the number of
direct-reclaim events, via a "digitally filtered, constant time based,
event frequency meter".

a) It loses information. If we were to export the number of pages
reclaimed from the mm, filtering can be done in userspace.

b) It omits reclaim performed by kswapd and by other tasks (ok, it's
very cpuset-specific).

c) It only counts synchronous try_to_free_pages() attempts. What if an
attempt only freed pagecache, or didbn't manage to free anything?

d) It doesn't notice if kswapd is swapping the heck out of your
not-allocating-any-memory-now process.

I think all the above can be addressed by exporting per-task (actually
per-mm) reclaim info. (I haven't put much though into what info that
should be - page reclaim attempts, mmapped reclaims, swapcache reclaims,
etc)