Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262228AbUKTB6h (ORCPT ); Fri, 19 Nov 2004 20:58:37 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262871AbUKTB6g (ORCPT ); Fri, 19 Nov 2004 20:58:36 -0500 Received: from fw.osdl.org ([65.172.181.6]:14215 "EHLO mail.osdl.org") by vger.kernel.org with ESMTP id S262743AbUKTB5O (ORCPT ); Fri, 19 Nov 2004 20:57:14 -0500 Date: Fri, 19 Nov 2004 17:56:43 -0800 (PST) From: Linus Torvalds To: Nick Piggin cc: Christoph Lameter , akpm@osdl.org, Benjamin Herrenschmidt , Hugh Dickins , linux-mm@kvack.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: page fault scalability patch V11 [0/7]: overview In-Reply-To: <419E98E7.1080402@yahoo.com.au> Message-ID: References: <419D581F.2080302@yahoo.com.au> <419D5E09.20805@yahoo.com.au> <1100848068.25520.49.camel@gaston> <419E98E7.1080402@yahoo.com.au> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 838 Lines: 22 On Sat, 20 Nov 2004, Nick Piggin wrote: > > The per thread rss may wrap (maybe not 64-bit counters), but even so, > the summation over all threads should still end up being correct I > think. Yes. As long as the total rss fits in an int, it doesn't matter if any of them wrap. Addition is still associative in twos-complement arithmetic even in the presense of overflows. If you actually want to make it proper standard C, I guess you'd have to make the thing unsigned, which gives you the mod-2**n guarantees even if somebody were to ever make a non-twos-complement machine. Linus - 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/