Re: [PATCH 1/4] Add kswapd descriptor.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> [2010-11-30 17:54:43]:

> On Tue, 30 Nov 2010 17:27:10 +0900
> KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:
> 
> > On Tue, 30 Nov 2010 17:15:37 +0900
> > Minchan Kim <minchan.kim@xxxxxxxxx> wrote:
> > 
> > > Ideally, I hope we unify global and memcg of kswapd for easy
> > > maintainance if it's not a big problem.
> > > When we make patches about lru pages, we always have to consider what
> > > I should do for memcg.
> > > And when we review patches, we also should consider what the patch is
> > > missing for memcg.
> > > It makes maintainance cost big. Of course, if memcg maintainers is
> > > involved with all patches, it's no problem as it is.
> > > 
> > I know it's not. But thread control of kswapd will not have much merging point.
> > And balance_pgdat() is fully replaced in patch/3. The effort for merging seems
> > not big.
> > 
> 
> kswapd's balance_pgdat() is for following
>   - reclaim pages within a node.
>   - balancing zones in a pgdat.
> 
> memcg's background reclaim needs followings.
>   - reclaim pages within a memcg
>   - reclaim pages from arbitrary zones, if it's fair, it's good.
>     But it's not important from which zone the pages are reclaimed from. 
>     (I'm not sure we can select "the oldest" pages from divided LRU.)
>

Yes, if it is fair, then we don't break what kswapd tries to do, so
fairness is quite important, in that we don't leaves zones unbalanced
(at least by very much) as we try to do background reclaim. But
sometimes it cannot be helped, specially if there are policies that
bias the allocation.
 
> Then, merging will put 2 _very_ different functionalities into 1 function.
> 
> So, I thought it's simpler to implement
> 
>  1. a victim node selector (This algorithm will never be in kswapd.)

A victim node selector per memcg? Could you clarify the context of
node here?

>  2. call _existing_ try_to_free_pages_mem_cgroup() with node local zonelist.
>  Sharing is enough.
> 
> kswapd stop/go routine may be able to be shared. But this patch itself seems not
> very good to me.
> 
> Thanks,
> -Kame
> 

-- 
	Three Cheers,
	Balbir

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]