Re: [PATCH] cpuset: make ntasks to be a monotonic increasing value

Paul Jackson
2008-07-31T19:38:39Z

Paul M wrote:
> That loop really could do with some updates though - currently it
> looks at the mm for every task in the cpuset, rather than filtering
> duplicate mms from threaded applications.

Interesting.

After a quick glance, I suppose that we'd still have:
1) allocate an mmarray[] in that particular loop as we do now,
sized large enough for all tasks,
2) convert each task to it's mm, in the next code chunk, with:
mm = get_task_mm(p);

but that then, before we call "mpol_rebind_mm()" for each such
mm, we could essentially do a "sort -u" (sort unique) on that
mmarray[], to remove duplicate mm's. This would not change any
of the existing loops; rather just add one more code paragraph,
to remove the duplicate mm's.

Is that what you're thinking, Paul M?

--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.940.382.4214