Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932539Ab2JQVF7 (ORCPT ); Wed, 17 Oct 2012 17:05:59 -0400 Received: from mail-ob0-f174.google.com ([209.85.214.174]:42401 "EHLO mail-ob0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932117Ab2JQVF5 (ORCPT ); Wed, 17 Oct 2012 17:05:57 -0400 MIME-Version: 1.0 In-Reply-To: References: <20121008150949.GA15130@redhat.com> <20121017040515.GA13505@redhat.com> <507E4531.1070700@jp.fujitsu.com> From: KOSAKI Motohiro Date: Wed, 17 Oct 2012 17:05:37 -0400 Message-ID: Subject: Re: [patch for-3.7] mm, mempolicy: fix printing stack contents in numa_maps To: David Rientjes Cc: Kamezawa Hiroyuki , Dave Jones , Andrew Morton , Linus Torvalds , bhutchings@solarflare.com, Konstantin Khlebnikov , Naoya Horiguchi , Hugh Dickins , linux-kernel@vger.kernel.org, linux-mm@kvack.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1375 Lines: 35 On Wed, Oct 17, 2012 at 3:50 PM, David Rientjes wrote: > On Wed, 17 Oct 2012, KOSAKI Motohiro wrote: > >> > I think this refcounting is better than using task_lock(). >> >> I don't think so. get_vma_policy() is used from fast path. In other >> words, number of >> atomic ops is sensible for allocation performance. > > There are enhancements that we can make with refcounting: for instance, we > may want to avoid doing it in the super-fast path when the policy is > default_policy and then just do > > if (mpol != &default_policy) > mpol_put(mpol); > >> Instead, I'd like >> to use spinlock >> for shared mempolicy instead of mutex. >> > > Um, this was just changed to a mutex last week in commit b22d127a39dd > ("mempolicy: fix a race in shared_policy_replace()") so that sp_alloc() > can be done with GFP_KERNEL, so I didn't consider reverting that behavior. > Are you nacking that patch, which you acked, now? Yes, sadly. /proc usage is a corner case issue. It's not worth to strike main path. see commit 52cd3b0740 and around patches. That explain why we avoided your approach. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/