Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 12 Feb 2001 22:55:15 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 12 Feb 2001 22:55:06 -0500 Received: from perninha.conectiva.com.br ([200.250.58.156]:5128 "EHLO perninha.conectiva.com.br") by vger.kernel.org with ESMTP id ; Mon, 12 Feb 2001 22:54:49 -0500 Date: Tue, 13 Feb 2001 00:05:50 -0200 (BRST) From: Marcelo Tosatti To: george anzinger cc: Rasmus Andersen , Rik van Riel , torvalds@transmeta.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH] guard mm->rss with page_table_lock (241p11) In-Reply-To: <3A88A6ED.6B51BCA9@mvista.com> Message-ID: 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 On Mon, 12 Feb 2001, george anzinger wrote: > Excuse me if I am off base here, but wouldn't an atomic operation be > better here. There are atomic inc/dec and add/sub macros for this. It > just seems that that is all that is needed here (from inspection of the > patch). Most functions which touch mm->rss already hold mm->page_table_lock (also this functions are called more often and they use more CPU). Making those functions use an atomic instruction just to optimize the functions which do not lock mm->page_table_lock is not a good tradeoff. - 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://vger.kernel.org/lkml/