From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1499CA9ED3 for ; Tue, 5 Nov 2019 03:32:58 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 542AC20818 for ; Tue, 5 Nov 2019 03:32:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="Po7fzpiZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 542AC20818 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 924686B0003; Mon, 4 Nov 2019 22:32:57 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8D44D6B0006; Mon, 4 Nov 2019 22:32:57 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7EA396B0007; Mon, 4 Nov 2019 22:32:57 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0062.hostedemail.com [216.40.44.62]) by kanga.kvack.org (Postfix) with ESMTP id 697786B0003 for ; Mon, 4 Nov 2019 22:32:57 -0500 (EST) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id 0704740D0 for ; Tue, 5 Nov 2019 03:32:57 +0000 (UTC) X-FDA: 76120802394.09.cry19_70e9cd3492656 X-HE-Tag: cry19_70e9cd3492656 X-Filterd-Recvd-Size: 2313 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf25.hostedemail.com (Postfix) with ESMTP for ; Tue, 5 Nov 2019 03:32:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=GeXXx5Sv4eWS4RncrnJJUwrNsIQzxvYmlwUrx6V7H7g=; b=Po7fzpiZCjqYIzSLr+2qtJ/hk KTFi3x0g5wZxja9Nezx41kFNxDTwriff5hV/hkOkuCIdC5Q5W/nsyDXncnCMDFsulNDNcwsfogXaM wbPQHRI9sa4fLBwK/Tm60RjjoWSEyhdGFZWU6unFHXB8NJ7ItN/UFZB3k+kb27hPJfu8TmFhoDJk3 5REGJkLGYNWl2Qcf75VStPMfZyVknxwmW+IWBs2xj2fUPO16pUQ2xu11DkzO/ulLolpgX/nly+L+2 tPmkplFcCKWwhBiqCLehsAsEvSQgTKRkDVtL11clxP8ud2B7WOmzf5uM2thERW7YrVbOwN3CrlGgI xdcVUMlpQ==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1iRpaN-0003eX-V8; Tue, 05 Nov 2019 03:32:51 +0000 Date: Mon, 4 Nov 2019 19:32:51 -0800 From: Matthew Wilcox To: Wei Yang Cc: linux-mm@kvack.org Subject: Re: Why sometimes count vm event with page number, sometimes not? Message-ID: <20191105033251.GB11823@bombadil.infradead.org> References: <20191105022643.GA14722@richard> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191105022643.GA14722@richard> User-Agent: Mutt/1.12.1 (2019-06-15) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000326, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Nov 05, 2019 at 10:26:44AM +0800, Wei Yang wrote: > Hi, All, > > I am curious about the semantic of __count_vm_event[s]. > > For example, we count PGDEACTIVATE event in lru_deactivate_file_fn() and > lru_deactivate_fn(). One of them count with number of page, the other not. > > Just curious about the exact value we want to count. I don't understand the question. We deactivate one page in lru_deactivate_file_fn(). We deactivate several pages in shrink_active_list(). PGDEACTIVATE counts the number of pages which have been deactivated. Does that answer your question?