lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 3 Aug 2009 17:45:19 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	David Rientjes <rientjes@...gle.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Rik van Riel <riel@...hat.com>,
	Paul Menage <menage@...gle.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [patch -mm v2] mm: introduce oom_adj_child

On Mon, 3 Aug 2009 01:08:42 -0700 (PDT)
David Rientjes <rientjes@...gle.com> wrote:

> On Mon, 3 Aug 2009, KAMEZAWA Hiroyuki wrote:
> 
> > > You can't recalculate it if all the remaining threads have a different 
> > > oom_adj value than the effective oom_adj value from the thread that is now 
> > > exited.  
> > 
> > Then, crazy google apps pass different oom_adjs to each thread ?
> > And, threads other than thread-group-leader modifies its oom_adj.
> > 
> 
> Nope, but I'm afraid you've just made my point for me: it shows that 
> oom_adj really isn't sanely used as a per-thread attribute and actually 
> only represents a preference on oom killing a quantity of memory in all 
> other cases other than vfork() -> change /proc/pid-of-child/oom_adj -> 
> exec() for which we now appropriately have /proc/pid/oom_adj_child for.
> 
Maybe you're man I can't persuade. but making progress will be necessary.

The most ugly thing which annoies me is this part. 

@@ -679,6 +679,7 @@ good_mm:                    #  a label in copy_mm.
 
 	tsk->mm = mm;
 	tsk->active_mm = mm;
+	tsk->oom_adj_child = mm->oom_adj;
 	return 0;

Why ?

I wonder oom_adj_exec "change oom_adj to this value when execve() is called"
is much more straightforward, simple and easy to understand than oom_adj_child.

"just inherit at fork, change at exec" is an usual manner, I think.
If oom_adj_exec rather than oom_adj_child, I won't complain, more.


Thanks,
-Kame



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ