Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932425AbVIZHZf (ORCPT ); Mon, 26 Sep 2005 03:25:35 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932142AbVIZHZf (ORCPT ); Mon, 26 Sep 2005 03:25:35 -0400 Received: from smtp205.mail.sc5.yahoo.com ([216.136.129.95]:9389 "HELO smtp205.mail.sc5.yahoo.com") by vger.kernel.org with SMTP id S932425AbVIZHZe (ORCPT ); Mon, 26 Sep 2005 03:25:34 -0400 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.au; h=Received:Subject:From:To:Cc:In-Reply-To:References:Content-Type:Date:Message-Id:Mime-Version:X-Mailer:Content-Transfer-Encoding; b=39WLGwEzSnjlKEcsLO7izDi6qwF0BTehVMV1JAm/wESOlcYpqrVf3dFOwHx6sTUZUngFwsoUUvCnyfYQhwZimqQaOdLliruHVmMCrH/NKbuonQvrlxbNZU1Gl0t7z5YNXJqUk1MNHudSyRDVml0Kc0YwlP5apq5eyUyDWwBUSGA= ; Subject: Re: [PATCH 17/21] mm: batch updating mm_counters From: Nick Piggin To: Hugh Dickins Cc: Andrew Morton , lkml In-Reply-To: References: Content-Type: text/plain Date: Mon, 26 Sep 2005 17:25:03 +1000 Message-Id: <1127719503.5101.38.camel@npiggin-nld.site> Mime-Version: 1.0 X-Mailer: Evolution 2.0.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1141 Lines: 34 On Sun, 2005-09-25 at 17:08 +0100, Hugh Dickins wrote: > tlb_finish_mmu used to batch zap_pte_range's update of mm rss, which may > be worthwhile if the mm is contended, and would reduce atomic operations > if the counts were atomic. Let zap_pte_range now batch its updates to > file_rss and anon_rss, per page-table in case we drop the lock outside; > and copy_pte_range batch them too. Good idea. > progress++; > continue; > } > - copy_one_pte(dst_mm, src_mm, dst_pte, src_pte, vm_flags, addr); > + anon = copy_one_pte(dst_mm, src_mm, dst_pte, src_pte, > + vm_flags, addr); > + rss[anon]++; How about passing rss[2] to copy_one_pte, and have that increment the correct rss value accordingly? Not that you may consider that any nicer than what you have here. Nick -- SUSE Labs, Novell Inc. Send instant messages to your online friends http://au.messenger.yahoo.com - 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/