linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* OOM may be being too nice to killed processes
@ 2001-11-04 20:36 Adam Pennington
  0 siblings, 0 replies; only message in thread
From: Adam Pennington @ 2001-11-04 20:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: riel

I may be misunderstanding this, but looking at this portion of code from 
the oom task killer... Isn't it dangerous to give a process PF_MEMALLOC and 
then only pass it a SIGTERM? My take is that the high priority bump up 
should only happen for the force_sig(SIGKILL,p).

        /*
         * We give our sacrificial lamb high priority and access to
         * all the memory it needs. That way it should be able to
         * exit() and clear out its resources quickly...
         */
        p->counter = 5 * HZ;
        p->flags |= PF_MEMALLOC;

        /* This process has hardware access, be more careful. */
        if (cap_t(p->cap_effective) & CAP_TO_MASK(CAP_SYS_RAWIO)) {
                force_sig(SIGTERM, p);
        } else {
                force_sig(SIGKILL, p);
        }

Adam Pennington

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-11-04 20:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-04 20:36 OOM may be being too nice to killed processes Adam Pennington

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).