Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751078AbZJPEJ3 (ORCPT ); Fri, 16 Oct 2009 00:09:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750932AbZJPEJ2 (ORCPT ); Fri, 16 Oct 2009 00:09:28 -0400 Received: from fgwmail7.fujitsu.co.jp ([192.51.44.37]:37455 "EHLO fgwmail7.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750923AbZJPEJ2 (ORCPT ); Fri, 16 Oct 2009 00:09:28 -0400 X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 Date: Fri, 16 Oct 2009 13:06:22 +0900 From: KAMEZAWA Hiroyuki To: Hugh Dickins Cc: Andrew Morton , Nitin Gupta , hongshin@gmail.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 7/9] swap_info: swap count continuations Message-Id: <20091016130622.8c096641.kamezawa.hiroyu@jp.fujitsu.com> In-Reply-To: References: <20091015123024.21ca3ef7.kamezawa.hiroyu@jp.fujitsu.com> <20091016102951.a4f66a19.kamezawa.hiroyu@jp.fujitsu.com> Organization: FUJITSU Co. LTD. X-Mailer: Sylpheed 2.5.0 (GTK+ 2.10.14; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1273 Lines: 33 On Fri, 16 Oct 2009 03:24:57 +0100 (BST) Hugh Dickins wrote: > On Fri, 16 Oct 2009, KAMEZAWA Hiroyuki wrote: > > > > > My concern is that small numbers of swap_map[] which has too much refcnt > > can consume too much pages. > > > > If an entry is shared by 65535, 65535/128 = 512 page will be used. > > (I'm sorry if I don't undestand implementation correctly.) > > Ah, you're thinking it's additive: perhaps because I use the name > "continuation", which may give that impression - maybe there's a > better name I can give it. > > No, it's multiplicative - just like 999 is almost a thousand, not 27. > > If an entry is shared by 65535, then it needs its original swap_map > page (0 to 0x3e) and a continuation page (0 to 0x7f) and another > continuation page (0 to 0x7f): if I've got my arithmetic right, > those three pages can hold a shared count up to 1032191, for > every one of that group of PAGE_SIZE neighbouring pages. > Ah, okay. I see. thank you for explanation. Regards, -Kame -- 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/