From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752721AbYKLBgy (ORCPT ); Tue, 11 Nov 2008 20:36:54 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751689AbYKLBgp (ORCPT ); Tue, 11 Nov 2008 20:36:45 -0500 Received: from wa-out-1112.google.com ([209.85.146.177]:49305 "EHLO wa-out-1112.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751658AbYKLBgo (ORCPT ); Tue, 11 Nov 2008 20:36:44 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=Q4kyVx/FLYEEBDBJpqh5E4ePuEYon5klyC2YMA9+ZN0o2yHowKkPRN7QpEuciNrrz2 GIBvSCLvXyHReTnRJxwVspzh3gdDSJXH6AGDo0OyvTcU5bp4Vc2Wd/7TN+gRZM3MOyOc WLONT6t0klBK+61iTEHylCwLbVizCoPvnauug= Message-ID: Date: Wed, 12 Nov 2008 09:36:43 +0800 From: "Pan ruochen" To: "Peter Zijlstra" Subject: Re: How kernel applies LRU to swap out physical pages? Cc: "KOSAKI Motohiro" , linux-kernel@vger.kernel.org In-Reply-To: <1226403220.7685.1601.camel@twins> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1226393845.7685.1294.camel@twins> <20081111180233.8B38.KOSAKI.MOTOHIRO@jp.fujitsu.com> <1226403220.7685.1601.camel@twins> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks to all, I've have a study. 2008/11/11 Peter Zijlstra : > On Tue, 2008-11-11 at 18:56 +0900, KOSAKI Motohiro wrote: >> > On Tue, 2008-11-11 at 16:22 +0800, Pan ruochen wrote: >> > > Hi All, >> > > I'm reading the linux kernel 2.6.14. But can't understand how LRU algorithm >> > > is applied to page swapping. what is the 'USED' of LRU referred to? The >> > > reference counter which the page is mapped by processes, or the frequency that >> > > CPU reads/writes in the page. In common sense, the LRU algorithm will be more >> > > optimal for the second case. But it depends on CPU capability. >> > > I will be very appreciated if somebody can explain that in details. >> > >> > We don't actually use LRU but something like CLOCK. > > FWIW in case you hadn't found it yet: > > http://en.wikipedia.org/wiki/Page_replacement_algorithm > > is a fairly decent page on the subject. >