[Webkit-unassigned] [Bug 155255] MemoryPressureHandler doesn't work if cgroups aren't present in Linux

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 14 00:26:45 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=155255

--- Comment #19 from ChangSeok Oh <changseok.oh at collabora.com> ---
(In reply to comment #15)
> (In reply to comment #13)
> 
> > > Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp:149
> > > +        sleep(s_pollingIntervalInSeconds);
> > > +    } while (true);
> > 
> > I'm not happy with this either, but I have no idea how to do this if meminfo
> > is not pollable. Note that there's one memory pressure handler per process .
> 
> We can use a larger polling interval (5 sec?) and wider memory threshold
> margins so that we trigger the pressure condition earlier without needing
> such a high monitoring frequency. Actually, I thing that the current
> thresholds for remaining memory of 300MB (non critical) and 100MB (critical)
> are wide enough.
Larger polling interval, less useful MemoryPressureHandler. Memory drain sometimes happen instantly. It means the hitting rate on OOM would decrease, larger interval is set. I don't know how we could figure out a proper threadhold which makes all systems happy. the thresholds you said sound very heuristic to me. I understand the necessity of your patch for RPi, but this is upstream. We need to consider not only RPi but also other systems using gtk.

> 
> About battery consumption, take into account the relative expense of
> "opening a text file, parsing its first lines and closing it". What can it
> be, some milliseconds? I can't believe it's so expensive compared to the
> huge amount of time (in terms of CPU time scale) that the thread is going to
> be idle.
As KaL explained, opening/reading a file is quite different from what this patch does. The former is a one-time usecase but the latter is something happening forever. Regularly waking a cpu up would prevents systems from going sleep mode or low-power mode. I don't know if this should be covered in application level. The best way would be that we adopt an interface provided by the linux system and that is why the current MemoryPressureHandler is based on the cgroup even though it is not perfect. I hope the cgroup memory management to be improved near time soon. :P

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160314/35c401e3/attachment-0001.html>


More information about the webkit-unassigned mailing list