All of lore.kernel.org
 help / color / mirror / Atom feed
* shared memory is over-counted N times when calculating badness()
@ 2007-02-12 22:08 Jeff Davis
  0 siblings, 0 replies; only message in thread
From: Jeff Davis @ 2007-02-12 22:08 UTC (permalink / raw)
  To: linux-kernel

In oom_kill.c, badness() counts half the total_vm of all the children
against the parent.

The problem with this calculation is that, if the parent and children
share memory, the shared memory is over-counted N/2 times where N is the
number of children.

There's already a hard limit on the amount of shared memory, so it's
unlikely that process is runaway due to shared memory consumption, and
shouldn't add to a process's badness() score.

Shouldn't it just use (total_vm - shared_vm) instead, and never even
count shared memory?

Regards,
	Jeff Davis


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

only message in thread, other threads:[~2007-02-12 22:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-12 22:08 shared memory is over-counted N times when calculating badness() Jeff Davis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.