From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760551AbZE3LgL (ORCPT ); Sat, 30 May 2009 07:36:11 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757581AbZE3Lf6 (ORCPT ); Sat, 30 May 2009 07:35:58 -0400 Received: from e2.ny.us.ibm.com ([32.97.182.142]:47071 "EHLO e2.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753639AbZE3Lf5 (ORCPT ); Sat, 30 May 2009 07:35:57 -0400 Date: Sat, 30 May 2009 19:35:54 +0800 From: Balbir Singh To: KAMEZAWA Hiroyuki Cc: "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "nishimura@mxp.nes.nec.co.jp" , "hugh.dickins@tiscali.co.uk" , "hannes@cmpxchg.org" , "akpm@linux-foundation.org" Subject: Re: [PATCH 2/4] modify swap_map and add SWAP_HAS_CACHE flag. Message-ID: <20090530113554.GN24073@balbir.in.ibm.com> Reply-To: balbir@linux.vnet.ibm.com References: <20090528135455.0c83bedc.kamezawa.hiroyu@jp.fujitsu.com> <20090528141900.c93fe1d5.kamezawa.hiroyu@jp.fujitsu.com> <20090530061008.GE24073@balbir.in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * KAMEZAWA Hiroyuki [2009-05-30 20:16:51]: > Balbir Singh wrote: > >> #define SWAP_CLUSTER_MAX 32 > >> > >> -#define SWAP_MAP_MAX 0x7fff > >> -#define SWAP_MAP_BAD 0x8000 > >> - > >> +#define SWAP_MAP_MAX 0x7ffe > >> +#define SWAP_MAP_BAD 0x7fff > >> +#define SWAP_HAS_CACHE 0x8000 /* There is a swap cache of entry. */ > > > > Why count, can't we use swp->flags? > > > > Hmm ? swap_map just only a "unsiged short" value per entry..sorry, > I can't catch what you mention to. Sorry for the noise, the count is directly contained in swap_map[]. -- Balbir