From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752475AbWCQBf6 (ORCPT ); Thu, 16 Mar 2006 20:35:58 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752515AbWCQBf6 (ORCPT ); Thu, 16 Mar 2006 20:35:58 -0500 Received: from smtp.osdl.org ([65.172.181.4]:58770 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S1752475AbWCQBf6 (ORCPT ); Thu, 16 Mar 2006 20:35:58 -0500 Date: Thu, 16 Mar 2006 17:38:08 -0800 From: Andrew Morton To: Hugh Dickins Cc: rlrevell@joe-job.com, mingo@elte.hu, nickpiggin@yahoo.com.au, linux-kernel@vger.kernel.org Subject: Re: [PATCH] fix free swap cache latency Message-Id: <20060316173808.3be343b0.akpm@osdl.org> In-Reply-To: References: X-Mailer: Sylpheed version 1.0.0 (GTK+ 1.2.10; i386-vine-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Hugh Dickins wrote: > > (*zap_work)--; > continue; > } > + > + (*zap_work) -= PAGE_SIZE; Sometimes we subtract 1 from zap_work, sometimes PAGE_SIZE. It's in units of bytes, so PAGE_SIZE is correct. Although it would make sense to redefine it to be in units of PAGE_SIZE. What's up with that? Even better, define it in units of "approximate number of touched cachelines". After all, it is a sort-of-time-based thing.