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.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 E66CBC35242 for ; Wed, 12 Feb 2020 02:38:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A30A0206ED for ; Wed, 12 Feb 2020 02:38:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="C02dv4e3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A30A0206ED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 30B336B0392; Tue, 11 Feb 2020 21:38:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2BBC56B0393; Tue, 11 Feb 2020 21:38:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1D05A6B0394; Tue, 11 Feb 2020 21:38:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0209.hostedemail.com [216.40.44.209]) by kanga.kvack.org (Postfix) with ESMTP id 033146B0392 for ; Tue, 11 Feb 2020 21:38:58 -0500 (EST) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 969508248068 for ; Wed, 12 Feb 2020 02:38:58 +0000 (UTC) X-FDA: 76479917556.08.shake73_140e8fed59440 X-HE-Tag: shake73_140e8fed59440 X-Filterd-Recvd-Size: 3956 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by imf48.hostedemail.com (Postfix) with ESMTP for ; Wed, 12 Feb 2020 02:38:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581475137; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MTaENnS0/v5SEj5ag4HRVYps59L0RPGzAYIr0vplBD4=; b=C02dv4e3kC4uVfFquoHRQ0EnJwCRr9+5Iy2FpT0tRTbTUc/dBtX4EzOnll6vFzpP4gmgdu t8EblfEabbW8LXM6s2KduiFPUHSjHEYreIl/7SP4PW8YMZQq5yTfiJamq09PtBKNHDr84+ TTKotLEGnzkHgG9SMEw8Y7AUXIHKI+o= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-99-OBGj5n2GMXq6W35u7OxtXA-1; Tue, 11 Feb 2020 21:38:49 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A8A0B8017DF; Wed, 12 Feb 2020 02:38:47 +0000 (UTC) Received: from localhost.localdomain (vpn2-54-85.bne.redhat.com [10.64.54.85]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F3D1989F3E; Wed, 12 Feb 2020 02:38:38 +0000 (UTC) Reply-To: Gavin Shan Subject: Re: [RFC PATCH] mm/vmscan: Don't round up scan size for online memory cgroup To: Yang Shi Cc: Roman Gushchin , Linux MM , drjones@redhat.com, david@redhat.com, bhe@redhat.com, Johannes Weiner References: <20200210121445.711819-1-gshan@redhat.com> <20200210161721.GA167254@tower.DHCP.thefacebook.com> <9919b674-244d-0a55-c842-b0661585f9e2@redhat.com> <20200211013118.GA147346@carbon.lan> <63c5d402-ec1e-2935-7f16-8e2aed047c7c@redhat.com> From: Gavin Shan Message-ID: <2c722ed4-7358-a26d-2219-2a9938b4fbf9@redhat.com> Date: Wed, 12 Feb 2020 13:38:34 +1100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: OBGj5n2GMXq6W35u7OxtXA-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 2/11/20 2:03 PM, Yang Shi wrote: > On Mon, Feb 10, 2020 at 6:18 PM Gavin Shan wrote: >> On 2/11/20 12:31 PM, Roman Gushchin wrote: >>> On Tue, Feb 11, 2020 at 10:55:53AM +1100, Gavin Shan wrote: >>>> On 2/11/20 3:17 AM, Roman Gushchin wrote: >>>>> On Mon, Feb 10, 2020 at 11:14:45PM +1100, Gavin Shan wrote: .../... >> >> There is something which might be unrelated to discuss here: the pagecache could be backed >> by a low-speed (HDD) or high-speed (SSD) media. So the cost to fetch them from disk to memory >> isn't equal, meaning we need some kind of bias during reclaiming. It seems something missed >> from current implementation. > > Yes, the refault cost was not taken into account. I recalled Johannes > posted a patch series to do swap with refault cost weighted in a > couple of years ago, please see: https://lwn.net/Articles/690079/. > Thanks for the link. Yes, Johannes's patchset is comprehensive, even I didn't look into the details. The concern I had is fixed bias to pagecaches backed by different storage device, which have different IO speed. It seems the patchset was disconnected since v1 because I didn't find a v2 from google. Thanks, Gavin