Messages in this thread | | | Date | Sun, 26 Oct 2014 19:49:26 +0100 | From | Pavel Machek <> | Subject | Re: [PATCH 3/4] OOM, PM: OOM killed task shouldn't escape PM suspend |
| |
Hi! > > +/* > + * Number of OOM killer invocations (including memcg OOM killer). > + * Primarily used by PM freezer to check for potential races with > + * OOM killed frozen task. > + */ > +static atomic_t oom_kills = ATOMIC_INIT(0); > + > +int oom_kills_count(void) > +{ > + return atomic_read(&oom_kills); > +} > + > +void note_oom_kill(void) > +{ > + atomic_inc(&oom_kills); > +} > +
Do we need the extra abstraction here? Maybe oom_kills should be exported directly? Pavel
-- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
| |