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
| ||
|
Date: Mon, 23 May 2011 18:58:26 -0700 (PDT) From: David Rientjes <rientjes@...gle.com> To: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com> cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org, akpm@...ux-foundation.org, caiqian@...hat.com, hughd@...gle.com, kamezawa.hiroyu@...fujitsu.com, minchan.kim@...il.com, oleg@...hat.com Subject: Re: [PATCH 4/5] oom: don't kill random process On Tue, 24 May 2011, KOSAKI Motohiro wrote: > > > > This is unnecessary and just makes the oom killer egregiously long. We > > > > are already diagnosing problems here at Google where the oom killer > > > > holds > > > > tasklist_lock on the readside for far too long, causing other cpus > > > > waiting > > > > for a write_lock_irq(&tasklist_lock) to encounter issues when irqs are > > > > disabled and it is spinning. A second tasklist scan is simply a > > > > non-starter. > > > > > > > > [ This is also one of the reasons why we needed to introduce > > > > mm->oom_disable_count to prevent a second, expensive tasklist scan. > > > > ] > > > > > > You misunderstand the code. Both select_bad_process() and > > > oom_kill_process() > > > are under tasklist_lock(). IOW, no change lock holding time. > > > > > > > A second iteration through the tasklist in select_bad_process() will > > extend the time that tasklist_lock is held, which is what your patch does. > > It never happen usual case. Plz think when happen all process score = 1. > I don't care if it happens in the usual case or extremely rare case. It significantly increases the amount of time that tasklist_lock is held which causes writelock starvation on other cpus and causes issues, especially if the cpu being starved is updating the timer because it has irqs disabled, i.e. write_lock_irq(&tasklist_lock) usually in the clone or exit path. We can do better than that, and that's why I proposed my patch to CAI that increases the resolution of the scoring and makes the root process bonus proportional to the amount of used memory. -- 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