Thread (48 messages) 48 messages, 6 authors, 2019-02-11

Re: [PATCH 2/2] mm: Consider subtrees in memory.events

From: Michal Hocko <mhocko@kernel.org>
Date: 2019-01-28 15:19:04
Also in: linux-mm, lkml

On Mon 28-01-19 06:54:07, Tejun Heo wrote:
Hello,

On Mon, Jan 28, 2019 at 03:52:10PM +0100, Michal Hocko wrote:
quoted
quoted
All .events files generate aggregated stateful notifications.  For
anyone to do anything, they'd have to remember the previous state to
identify what actually happened.  Being hierarchical, it'd of course
need to walk down when an event triggers.
And how do you do that in a raceless fashion?
Hmm... I'm having trouble imagining why this would be a problem.  How
would it race?
How do you make an atomic snapshot of the hierarchy state? Or you do
not need it because event counters are monotonic and you are willing to
sacrifice some lost or misinterpreted events? For example, you receive
an oom event while the two children increase the oom event counter. How
do you tell which one was the source of the event and which one is still
pending? Or is the ordering unimportant in general?

I can imagine you can live with this model, but having a hierarchical
reporting without a source of the event just sounds too clumsy from my
POV. But I guess this is getting tangent to the original patch.
-- 
Michal Hocko
SUSE Labs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help