lkml.org 
[lkml]   [2010]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 07/11] Memory compaction core
Date
> > > > V1 did compaction per pageblock. but current patch doesn't.
> > > > so, Is COMPACTBLOCKS still good name?
> > >
> > > It's not such a minor nit. I wondered about that myself but it's still a
> > > block - just not a pageblock. Would COMPACTCLUSTER be a better name as it's
> > > related to COMPACT_CLUSTER_MAX?
> >
> > I've looked at this code again. honestly I'm a abit confusing even though both your
> > suggestions seems reasonable.
> >
> > now COMPACTBLOCKS is tracking #-of-called-migrate_pages. but I can't imazine
> > how to use it. can you please explain this ststics purpose? probably this is only useful
> > when conbination other stats, and the name should be consist with such combination one.
> >
>
> It is intended to count how many steps compaction took, the fewer the
> better so minimally, the lower this number is the better. Specifically, the
> "goodness" is related to the number of pages that were successfully allocated
> due to compaction. Assuming the only high-order allocation was huge pages,
> one possible calculation for "goodness" is;
>
> hugepage_clusters = (1 << HUGE HUGETLB_PAGE_ORDER) / COMPACT_CLUSTER_MAX
> goodness = (compactclusters / hugepage_clusters) / compactsuccess
>
> The value of goodness is undefined if "compactsuccess" is 0.
>
> Otherwise, the closer the "goodness" is to 1, the better. A value of 1
> implies that compaction is selecting exactly the right blocks for migration
> and the minimum number of pages are being moved around. The greater the value,
> the more "useless" work compaction is doing.
>
> If there are a mix of high-orders that are resulting in compaction, calculating
> the goodness is a lot harder and compactcluster is just a rule of thumb as
> to how much work compaction is doing.
>
> Does that make sense?

Sure! then, now I fully agree with COMPACTCLUSTER.

Thanks.




\
 
 \ /
  Last update: 2010-03-19 07:25    [W:0.125 / U:0.576 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site