Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754169AbXHPEEH (ORCPT ); Thu, 16 Aug 2007 00:04:07 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750771AbXHPEDw (ORCPT ); Thu, 16 Aug 2007 00:03:52 -0400 Received: from rhun.apana.org.au ([64.62.148.172]:3519 "EHLO arnor.apana.org.au" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750725AbXHPEDv (ORCPT ); Thu, 16 Aug 2007 00:03:51 -0400 Date: Thu, 16 Aug 2007 12:03:08 +0800 From: Herbert Xu To: Paul Mackerras Cc: Christoph Lameter , Satyam Sharma , "Paul E. McKenney" , Stefan Richter , Chris Snook , Linux Kernel Mailing List , linux-arch@vger.kernel.org, Linus Torvalds , netdev@vger.kernel.org, Andrew Morton , ak@suse.de, heiko.carstens@de.ibm.com, davem@davemloft.net, schwidefsky@de.ibm.com, wensong@linux-vs.org, horms@verge.net.au, wjiang@resilience.com, cfriesen@nortel.com, zlynx@acm.org, rpjday@mindspring.com, jesper.juhl@gmail.com, segher@kernel.crashing.org Subject: Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures Message-ID: <20070816040308.GA32133@gondor.apana.org.au> References: <20070816005348.GA9645@linux.vnet.ibm.com> <20070816011414.GC9645@linux.vnet.ibm.com> <20070816020851.GA30809@gondor.apana.org.au> <18115.49946.522011.832468@cargo.ozlabs.ibm.com> <20070816033343.GA31844@gondor.apana.org.au> <18115.51472.408193.332905@cargo.ozlabs.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18115.51472.408193.332905@cargo.ozlabs.ibm.com> User-Agent: Mutt/1.5.9i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1280 Lines: 30 On Thu, Aug 16, 2007 at 01:48:32PM +1000, Paul Mackerras wrote: > Herbert Xu writes: > > > If you're referring to the code in sk_stream_mem_schedule > > then it's working as intended. The atomicity guarantees > > You mean it's intended that *sk->sk_prot->memory_pressure can end up > as 1 when sk->sk_prot->memory_allocated is small (less than > ->sysctl_mem[0]), or as 0 when ->memory_allocated is large (greater > than ->sysctl_mem[2])? Because that's the effect of the current code. > If so I wonder why you bother computing it. You need to remember that there are three different limits: minimum, pressure, and maximum. By default we should never be in a situation where what you say can occur. If you set all three limits to the same thing, then yes it won't work as intended but it's still well-behaved. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - 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/