From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760034Ab2JYSHE (ORCPT ); Thu, 25 Oct 2012 14:07:04 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]:35322 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759076Ab2JYSHA (ORCPT ); Thu, 25 Oct 2012 14:07:00 -0400 Date: Thu, 25 Oct 2012 11:06:52 -0700 From: Tejun Heo To: Glauber Costa Cc: JoonSoo Kim , linux-mm@kvack.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, Mel Gorman , Andrew Morton , Michal Hocko , Johannes Weiner , kamezawa.hiroyu@jp.fujitsu.com, Christoph Lameter , David Rientjes , Pekka Enberg , devel@openvz.org, Pekka Enberg , Suleiman Souhlal Subject: Re: [PATCH v5 08/18] memcg: infrastructure to match an allocation to the right cache Message-ID: <20121025180652.GM11442@htj.dyndns.org> References: <1350656442-1523-1-git-send-email-glommer@parallels.com> <1350656442-1523-9-git-send-email-glommer@parallels.com> <50891CF2.3030400@parallels.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50891CF2.3030400@parallels.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Glauber. On Thu, Oct 25, 2012 at 03:05:22PM +0400, Glauber Costa wrote: > > Is there any rmb() pair? > > As far as I know, without rmb(), wmb() doesn't guarantee anything. > > > > There should be. But it seems I missed it. Speaking of which, I should You probably can use read_barrier_depends(). > wmb() after the NULL assignment in release cache as well. And you probably don't need that. dangling pointer is protected by RCU and there isn't any memory accesses which can paired with that anyway. Thanks. -- tejun From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx153.postini.com [74.125.245.153]) by kanga.kvack.org (Postfix) with SMTP id E30476B0072 for ; Thu, 25 Oct 2012 14:07:00 -0400 (EDT) Received: by mail-pa0-f41.google.com with SMTP id fa10so1493381pad.14 for ; Thu, 25 Oct 2012 11:07:00 -0700 (PDT) Date: Thu, 25 Oct 2012 11:06:52 -0700 From: Tejun Heo Subject: Re: [PATCH v5 08/18] memcg: infrastructure to match an allocation to the right cache Message-ID: <20121025180652.GM11442@htj.dyndns.org> References: <1350656442-1523-1-git-send-email-glommer@parallels.com> <1350656442-1523-9-git-send-email-glommer@parallels.com> <50891CF2.3030400@parallels.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50891CF2.3030400@parallels.com> Sender: owner-linux-mm@kvack.org List-ID: To: Glauber Costa Cc: JoonSoo Kim , linux-mm@kvack.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, Mel Gorman , Andrew Morton , Michal Hocko , Johannes Weiner , kamezawa.hiroyu@jp.fujitsu.com, Christoph Lameter , David Rientjes , Pekka Enberg , devel@openvz.org, Pekka Enberg , Suleiman Souhlal Hello, Glauber. On Thu, Oct 25, 2012 at 03:05:22PM +0400, Glauber Costa wrote: > > Is there any rmb() pair? > > As far as I know, without rmb(), wmb() doesn't guarantee anything. > > > > There should be. But it seems I missed it. Speaking of which, I should You probably can use read_barrier_depends(). > wmb() after the NULL assignment in release cache as well. And you probably don't need that. dangling pointer is protected by RCU and there isn't any memory accesses which can paired with that anyway. Thanks. -- tejun -- 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/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [PATCH v5 08/18] memcg: infrastructure to match an allocation to the right cache Date: Thu, 25 Oct 2012 11:06:52 -0700 Message-ID: <20121025180652.GM11442@htj.dyndns.org> References: <1350656442-1523-1-git-send-email-glommer@parallels.com> <1350656442-1523-9-git-send-email-glommer@parallels.com> <50891CF2.3030400@parallels.com> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=DFUiJsfAHFAhEJUxmHs6bi0bY+OxYytZF8u8GY2O4Q0=; b=kCk9oSQX/4Vrt43kl5r/W+sv3GfynUZMIllewARRDr36FYhsPK/Hk7zWoU5AyiCI2W /bvBMl+5zpcXMPAHQwi+ApCFiGcC3vlu9jNK5n1ojIbI8anetDbHSuM+RAxFg9k7eYWK k8RWspWHCXLcrGEolvdc6n8Nu5UTV4Man9FyRTuL5NFqOhWSCt3aeorwRO2i55scrNZg G4BLKe1XWuTFjK/MzmAscQzvJ1jQ6E4KAZubHgFfRXENY90gQ324y3br0R7NZ6A8+Fy5 CZZuHtOXFiuM8dZpH+qAD2aeqhmBtS1i+W4GFSB8LUMT9+zZDTE7i1QJ5zoFtTKAt592 4gtw== Content-Disposition: inline In-Reply-To: <50891CF2.3030400-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Glauber Costa Cc: JoonSoo Kim , linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Mel Gorman , Andrew Morton , Michal Hocko , Johannes Weiner , kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org, Christoph Lameter , David Rientjes , Pekka Enberg , devel-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org, Pekka Enberg , Suleiman Souhlal Hello, Glauber. On Thu, Oct 25, 2012 at 03:05:22PM +0400, Glauber Costa wrote: > > Is there any rmb() pair? > > As far as I know, without rmb(), wmb() doesn't guarantee anything. > > > > There should be. But it seems I missed it. Speaking of which, I should You probably can use read_barrier_depends(). > wmb() after the NULL assignment in release cache as well. And you probably don't need that. dangling pointer is protected by RCU and there isn't any memory accesses which can paired with that anyway. Thanks. -- tejun