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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53DD6ECAAA6 for ; Fri, 26 Aug 2022 17:59:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 89FA3940007; Fri, 26 Aug 2022 13:59:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 84DBC6B0074; Fri, 26 Aug 2022 13:59:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 714E2940007; Fri, 26 Aug 2022 13:59:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 638576B0073 for ; Fri, 26 Aug 2022 13:59:23 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 3210B1407CE for ; Fri, 26 Aug 2022 17:59:23 +0000 (UTC) X-FDA: 79842505806.27.EE9D46D Received: from mail-vk1-f172.google.com (mail-vk1-f172.google.com [209.85.221.172]) by imf15.hostedemail.com (Postfix) with ESMTP id CE2CAA002D for ; Fri, 26 Aug 2022 17:59:22 +0000 (UTC) Received: by mail-vk1-f172.google.com with SMTP id i129so1008043vke.3 for ; Fri, 26 Aug 2022 10:59:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=vCV2omY9ijtVYu9k7gten3FjMVOGoO9d/FfTV0tOh+w=; b=WgfjaxEm6yixZ+k9yPqVETRkU2iZYTTzu5O/XKGhTFHMRan1ldjZPGXLpOJXMwQ25V N2WYwDdDwrOwpAN3WmHOPWenjCAontmgL5O7ONBCGEaud8sorw3k9K5OVKwvgao44+jG isLa49rsnu9WTddesPwJ4Zc/sMhfak6CqIDnkKBQUAEgeLcYsdSc2naKnv4Pykj2uzPI nYzO5GBPfCCYUPGaoFQ8zdF+vZlx8rJa/KfqK0Z2GZzKMF5ngZ2jUeMV58KtrkJWmZDz tYs0CnHGp9brqVt+t3GKZnyJoAAYu9kT+5taP7WLF5B9mZRJCwRrkaODnPFmoZEk4mbg eMmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=vCV2omY9ijtVYu9k7gten3FjMVOGoO9d/FfTV0tOh+w=; b=5UvO9QvXv9ly22PYPKrmEPGHl9nkh9r8TV3PO1PjIQ9p1tpxxEYsWlq0WpcfpmyDB6 igLohvhrzmQAVvaB95FpjtDZqhCrNEwOVB1SM8IXqIU7AbCd+5WL396QbYmI/Y2hm59d HN4WmMDmLV8qoWwWC586eci6vRURMMffjSQh1rVdII9ZKV7smOpp+u7sxfEtU95HQFQY IWyqzpWUamY8IL9h0fOLj1qRv7o85DpNgAssmtwBlL/UIHbtyzF2aHnz0E1AbFBQFCNI 3scFAJg2QO5Yv0wa/Eyble0t9dY+CGYIx1sz1OirxqHaSJ22zWsy/CD4rlZwVwsgOyJA NbZQ== X-Gm-Message-State: ACgBeo2GJ/QwVjngTx/cBZyzwH7+X068qK1okyZyUcDHKCyNmGdeDlVR A8gd6YcaEQ6lOZHSEYtiSekD/nWy993ypkjUiAhg2A== X-Google-Smtp-Source: AA6agR5xl5SbTgXYxjc0xP7dp333NaNQa6GNKGdFOEhJ9Gm/uXqXG9cXqSe2qdnz8CXH2qShlzpD57wDZVSWyQVzQVM= X-Received: by 2002:a1f:9b07:0:b0:378:7c48:c6c with SMTP id d7-20020a1f9b07000000b003787c480c6cmr248229vke.32.1661536761929; Fri, 26 Aug 2022 10:59:21 -0700 (PDT) MIME-Version: 1.0 References: <485f8c33.2471b.182d5726afb.Coremail.hantianshuo@iie.ac.cn> In-Reply-To: From: Yu Zhao Date: Fri, 26 Aug 2022 11:58:45 -0600 Message-ID: Subject: Re: (resend)WARNING: trying to isolate tail page in isolate_lru_page To: Minchan Kim Cc: Matthew Wilcox , "Yin, Fengwei" , Yang Shi , Andrew Morton , Linux-MM , =?UTF-8?B?6Z+p5aSp56GV?= , mawupeng Content-Type: text/plain; charset="UTF-8" ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=WgfjaxEm; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf15.hostedemail.com: domain of yuzhao@google.com designates 209.85.221.172 as permitted sender) smtp.mailfrom=yuzhao@google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661536762; a=rsa-sha256; cv=none; b=H8J2iGMyisC+U/tv3V5B5wB+OyeOxKAVMny44SvOhpOHfVVSaH7rtBMKsJqHIT/n1L6bah YlAiwQ6Wz6FIS6P8/CIIZTZPe0OBfPd3pim4xs8Xk01pL6G+RzwklpRSiJTZ+Jw1Zc6NW4 VhPvm8+draHxRYipcS08RPZEuw3Mcmc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661536762; h=from:from:sender: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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=vCV2omY9ijtVYu9k7gten3FjMVOGoO9d/FfTV0tOh+w=; b=wZcvRh4YtTftiuerVt0U5+4YasQ9WhzLYXmg5FfIxi+AWJl57KGbGXawwW7Ar4D9U5dg/W njjNsh4LYc+Fey9MYAFG9M4mjTAkoBBmKIjocLAXlIoPxV46ImlHp3AC2fEC3eclBmTcjm iK0xDmURSWOJCJ3tRLUxPMXVq+F5la8= X-Rspam-User: X-Rspamd-Queue-Id: CE2CAA002D Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=WgfjaxEm; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf15.hostedemail.com: domain of yuzhao@google.com designates 209.85.221.172 as permitted sender) smtp.mailfrom=yuzhao@google.com X-Stat-Signature: k1retbakidm5h6sn886ftodn535whkeo X-Rspamd-Server: rspam03 X-HE-Tag: 1661536762-964699 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 Fri, Aug 26, 2022 at 11:53 AM Minchan Kim wrote: > > On Fri, Aug 26, 2022 at 11:27:53AM -0600, Yu Zhao wrote: > > On Fri, Aug 26, 2022 at 11:15 AM Matthew Wilcox wrote: > > > > > > On Fri, Aug 26, 2022 at 11:20:58AM +0800, Yin, Fengwei wrote: > > > > On 8/26/2022 2:46 AM, Matthew Wilcox wrote: > > > > > There's a number of ways of solving this. I'm interested in seeing > > > > > which one Minchan thinks is best. > > > > > > > > My understanding is: > > > > PageTransCompound() return false for compound page if THP is disabled > > > > in kernel config. Replacing PageTransCompound() with PageCompound() > > > > could work here. But for the long term, folio should be the answer. :). > > > > > > Yes, ultimately, isolate_lru_page() is going away as an interface > > > and one will have to call folio_isolate_lru(). But should > > > madvise_cold_or_pageout_pte_range() even be getting called for VMAs > > > which are mmaps of af_packet? can_madv_lru_vma() rules out a number > > > of different types of VMA; should it also be ruling out af_packet VMAs? > > > > Agreed. > > > > > If so, how? > > > > We should add a reliable helper to tell whether a file VMA is > > reclaimable or not. I don't think we have one. Currently MGLRU checks > > mapping->a_ops->read_folio for file VMAs to determine whether they are > > reclaimable. > > > > Long term, that's better idea(For stable backport, I'd like to go with > simple PageLRU check). > > I wonder it's possible to mix LRU pages and non-struct pages together > in a VMA. The only way to add file pages to LRU is to go through page cache, and page cache can't handle PFN pages. > Otherwise, could we reuse(abuse) VM_MIXEDMAP? VM_SPECIAL