From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail143.messagelabs.com (mail143.messagelabs.com [216.82.254.35]) by kanga.kvack.org (Postfix) with ESMTP id 4E1CF6B004A for ; Wed, 20 Jul 2011 02:34:19 -0400 (EDT) Received: by iyb14 with SMTP id 14so4531160iyb.14 for ; Tue, 19 Jul 2011 23:34:17 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 20 Jul 2011 12:04:17 +0530 Message-ID: Subject: Re: [PATCH 2/2] memcg: change memcg_oom_mutex to spinlock From: Balbir Singh Content-Type: text/plain; charset=ISO-8859-1 Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko Cc: linux-mm@kvack.org, KAMEZAWA Hiroyuki , Andrew Morton , linux-kernel@vger.kernel.org On Thu, Jul 14, 2011 at 8:59 PM, Michal Hocko wrote: > memcg_oom_mutex is used to protect memcg OOM path and eventfd interface > for oom_control. None of the critical sections which it protects sleep > (eventfd_signal works from atomic context and the rest are simple linked > list resp. oom_lock atomic operations). > Mutex is also too heavy weight for those code paths because it triggers > a lot of scheduling. It also makes makes convoying effects more visible > when we have a big number of oom killing because we take the lock > mutliple times during mem_cgroup_handle_oom so we have multiple places > where many processes can sleep. > > Signed-off-by: Michal Hocko Quick question: How long do we expect this lock to be taken? What happens under oom? Any tests? Numbers? Balbir Singh -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org