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=-8.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL 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 645A0C54E8D for ; Mon, 11 May 2020 21:38:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0B799206B8 for ; Mon, 11 May 2020 21:38:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="oSF4+U2K" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0B799206B8 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7399A900083; Mon, 11 May 2020 17:38:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6EAB7900036; Mon, 11 May 2020 17:38:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5D948900083; Mon, 11 May 2020 17:38:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0025.hostedemail.com [216.40.44.25]) by kanga.kvack.org (Postfix) with ESMTP id 4310D900036 for ; Mon, 11 May 2020 17:38:37 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id EC56C180AD815 for ; Mon, 11 May 2020 21:38:36 +0000 (UTC) X-FDA: 76805752632.30.smell56_10f8bac6f481a X-HE-Tag: smell56_10f8bac6f481a X-Filterd-Recvd-Size: 3829 Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) by imf18.hostedemail.com (Postfix) with ESMTP for ; Mon, 11 May 2020 21:38:36 +0000 (UTC) Received: by mail-lf1-f67.google.com with SMTP id 8so6093647lfp.4 for ; Mon, 11 May 2020 14:38:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ChSHe7FyTa+zjt6baNaGuWMAUroI1EbP4D6mMzh7YJM=; b=oSF4+U2KXK69tC+TCifckd1LCmMy3VPdfqBe1H3p00uNL+RZoV+8g1FlZFsG+WV5Nc ywCLC0VjdXoWrmB7QP8d50OgBUxhPzo0JiuH4cdGazSFfHdbujS2CZDHTRMHJ6SsfKBk JYyFZXi7rto2xB8IQtklg0A/bR6KPzuoOtdecmUvVd5u33iqoWbEnqVtJsbNjKbHHFFp EqldSHq8bgLJKfgjCjWQJpvVSjHjo32giKfT7S0D6FteIkZ8uTsjTM0kbfE0s9cGl7Bh 9U4qVdpc4splQNkTxucNUaXK01X4kxCce6g6rUVcJUII44ETF0RrwW5YBsykyhzS9bd6 DK1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ChSHe7FyTa+zjt6baNaGuWMAUroI1EbP4D6mMzh7YJM=; b=k6ZrZzLPYpoUdKLLSQqSFH7zgNN9y1vuuCBDeDvW2JBFChu7uBg3wiZ878EH89ub5y Eai1iwdu55loGLJsXvN9tJQx3tPv0n8GpvvCg16zDKcqiwsEFNVbGQND3I/yU02YUZUp dwOHSZYcndT4aEeNu1yLiQzKBvbKsUYFsCvPn4GG7iiwbQhs2JkFklBfrcJXUYDzGhYP P8RuiavPF3btMVmvSMU33R3yxY6vXvTe1ejWzasBVrbcvFXzEhC96u+wrwp5ugZtvj3M ooLDaeKQBAtl1hcm7ihoi2C9dxiBT995b8H5uA9fhT7NlkYMVd+pHaBe7+E+6rwzOUvk NPsg== X-Gm-Message-State: AOAM5306YKt2zPBeHIlMx/hyTKIMrziTs7h59YpI4sgrYJQ0Dy7N2ODU MLjwvy9BBrlb40DlqtYz5XFMDGc3p2KzkPs9BpW9sQ== X-Google-Smtp-Source: ABdhPJzEElsneOzpJM1AZJZxWL1/CIWd8ha2yYl9sAEzl8q88dZ6kCXi9uzvw3rSEUq8Fa2zOdSobO/bBpYArZvnJm0= X-Received: by 2002:ac2:5ccf:: with SMTP id f15mr12233151lfq.216.1589233114742; Mon, 11 May 2020 14:38:34 -0700 (PDT) MIME-Version: 1.0 References: <20200509141946.158892-1-shakeelb@google.com> <20200511141122.9b03e2f0852b57b224eab066@linux-foundation.org> In-Reply-To: <20200511141122.9b03e2f0852b57b224eab066@linux-foundation.org> From: Shakeel Butt Date: Mon, 11 May 2020 14:38:23 -0700 Message-ID: Subject: Re: [PATCH] mm: fix LRU balancing effect of new transparent huge pages To: Andrew Morton Cc: Mel Gorman , Johannes Weiner , Roman Gushchin , Michal Hocko , Minchan Kim , Rik van Riel , Linux MM , LKML Content-Type: text/plain; charset="UTF-8" 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 Mon, May 11, 2020 at 2:11 PM Andrew Morton wrote: > > On Sat, 9 May 2020 07:19:46 -0700 Shakeel Butt wrote: > > > Currently, THP are counted as single pages until they are split right > > before being swapped out. However, at that point the VM is already in > > the middle of reclaim, and adjusting the LRU balance then is useless. > > > > Always account THP by the number of basepages, and remove the fixup > > from the splitting path. > > Confused. What kernel is this applicable to? It is still applicable to the latest Linux kernel. Basically lruvec->reclaim_stat->recent_[scanned|rotated] counters are used as heuristic in get_scan_count() to measure how much file and anon LRUs should be scanned by the current reclaim. Previously huge pages are treated as single page while updating the recent_[scanned|rotated] counters in swap.c while vmscan.c correctly updates them as huge pages.