Re: [PATCH v6] memcg: event control at vmpressure.

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

 



Hi Minchan,

Thanks for your thoughtful reviews!

On Sat, Jun 22, 2013 at 01:27:43AM +0900, Minchan Kim wrote:
> On Fri, Jun 21, 2013 at 11:19:44AM +0200, Michal Hocko wrote:
> > On Fri 21-06-13 10:22:34, Minchan Kim wrote:
> > > On Fri, Jun 21, 2013 at 09:24:38AM +0900, Hyunhee Kim wrote:
> > > > In the original vmpressure, events are triggered whenever there is a reclaim
> > > > activity. This becomes overheads to user space module and also increases
> > > 
> > > Not true.
> > > We have lots of filter to not trigger event even if reclaim is going on.
> > > Your statement would make confuse.
> > 
> > Where is the filter implemented? In the kernel? I do not see any
> > throttling in the current mm tree.
> 
> 1. mem_cgroup_soft_limit_reclaim
> 2. reclaim caused by DMA zone
> 3. vmpressure_win

(Which is going to be machine-size dependant. Plus, it is also an option
to add more filters into the kernel, userland does not need to know all
these "details".)

> > yes, this is the risk of the edge triggering and the user has to be
> > prepared for that. I still think that it makes some sense to have the
> > two modes.
> 
> I'm not sure it's good idea.

After your explanations, it sounds like a bad idea to me. :)

> How could user overcome above problem?
[...]
> So, the description should include how to overcome above situation in
> userspace efficiently even though memory is really tight, which we don't
> have extra memory to read vmstat.

Exactly. What userland would do is it will try to play games with vmstat,
e.g. polling it until it makes sure (by some heuristics) that it is
[again] safe to rely on the notifications. This makes the edge-triggered
interface simply unpredictible.

Until we find any better scheme for filtering, I'd suggest abandon the
idea of the edge tirggered stuff. Instead, I see a possible solution in
defining a new pressure level, or even a new scale (alongside with the
current "low/mid/critical" one), which will have a well-defined behaviour
and that will suit Samsung's needs.

(And for the time being the userland can perfectly fine play the vmstat
games after closing or not reading eventfd, that way you won't receive the
notifications and thus will still able to implement kind of "filtering" in
userland. Surely it is a hack, but much better than the unpredictible
behaviour on the kernel side.)

Thanks,

Anton

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
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]