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 95AE9ECAAA3 for ; Fri, 26 Aug 2022 18:19:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AA25F940007; Fri, 26 Aug 2022 14:19:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A51526B0074; Fri, 26 Aug 2022 14:19:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8F16C940007; Fri, 26 Aug 2022 14:19:52 -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 7C9CE6B0073 for ; Fri, 26 Aug 2022 14:19:52 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 49A051203C1 for ; Fri, 26 Aug 2022 18:19:52 +0000 (UTC) X-FDA: 79842557424.28.5E0001B Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by imf12.hostedemail.com (Postfix) with ESMTP id 089EA40009 for ; Fri, 26 Aug 2022 18:19:50 +0000 (UTC) Received: by mail-pg1-f179.google.com with SMTP id 12so2081301pga.1 for ; Fri, 26 Aug 2022 11:19:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=TYNEQ3JlqzVXZBqdatxLNvwTJkcEX+VzU8xmOahkjnY=; b=NPyVHEAraUU7RgbcftCUSU7nvt2ZrLGskAQuc9TM0ZA4jSLikb6R5ucIPTx9S61xp3 vKXPLBRbjEQM999JbG1uRBlO5eZa/iubeO1Q4o90ycaezY9m/Tf3RodbZmdPOlfqY2xO dBblFDYC6McgNiW2L8qOFbTf9ZrvCYTylbRmu5k5UMtyTGYTm64wT8mALYpSPB4GdREe Fk4n25gO2TzzxrxGS8SCY0zxikzrE+/QrVNLVGSSMmQJVFqlQpHlm0hzABUhKYGGjPWC Vac1ifPfYN0+yRkTfLB+HA8tRlmI7ORnIroyW6sO5gGAmg7ub/jjxHzo55epC9ZjbK1+ ndYQ== 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=TYNEQ3JlqzVXZBqdatxLNvwTJkcEX+VzU8xmOahkjnY=; b=e6vq6EePUs6DrSKkEwmhAtcwj0e2E6GitVhToZTXvQz+b1xPcNp7vV2f/ob/WsEiwD BgadQ2ht7iaftbFWMcBUnoY+D8jpbfVwqnavUIlWwok/H5v9umCoheY2bn7qiNBqbXG5 1jJuLR3LZ2nFzgIEpszItau1KaLituejCFahd5794j7FZXjES+cCjLlsBUWO7QI1H8pW HXXPXCHRH7kdcCw1dRkpEWNbz3xcBLZ68766n8KbkulDlVwVYdtv7Kvv05OtQ4VdKBuD H4HBsdUaba4ekN3Eqc4GtshObvjirdCdZn1RoJvr+lvAjyXBt7wjalLRANEsxQ9qoUvJ Cquw== X-Gm-Message-State: ACgBeo3STp6pI1vU9XM4WCNYEl5W6obuPLe+y4WziydihNYpXK5aMBvn mRMegJJHjkUMLEY8F0n5AdB1Oub4kjV7CZBtJjE= X-Google-Smtp-Source: AA6agR6hOlBfxLjyRS9nTc+/HEAnY3QzFnWCmlR7Dz8aPDJURUlsfB9a6CsS9eGM4eNtNUbuUgjjl8t1JdKv6GOgt2E= X-Received: by 2002:aa7:9193:0:b0:536:62e6:1a84 with SMTP id x19-20020aa79193000000b0053662e61a84mr5053752pfa.20.1661537989905; Fri, 26 Aug 2022 11:19:49 -0700 (PDT) MIME-Version: 1.0 References: <485f8c33.2471b.182d5726afb.Coremail.hantianshuo@iie.ac.cn> In-Reply-To: From: Yang Shi Date: Fri, 26 Aug 2022 11:19:37 -0700 Message-ID: Subject: Re: (resend)WARNING: trying to isolate tail page in isolate_lru_page To: Minchan Kim Cc: Yu Zhao , Matthew Wilcox , "Yin, Fengwei" , Andrew Morton , Linux-MM , =?UTF-8?B?6Z+p5aSp56GV?= , mawupeng Content-Type: text/plain; charset="UTF-8" ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=NPyVHEAr; spf=pass (imf12.hostedemail.com: domain of shy828301@gmail.com designates 209.85.215.179 as permitted sender) smtp.mailfrom=shy828301@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661537991; a=rsa-sha256; cv=none; b=JlZHbiUUfJaPNiJkkr3udwqAOBfEWcslez3U0d4gCOfriLkqCwIWOWSizk5fhw3NJBan5S kzTFMHq6H5EyInOzjR/4Lv4+wNeGiZSqMqELzMvCmSCUIuVNy3Ucg4FiGA2FtB13DnB01U uRdF1jTkRRY7/kzbbnb2guddPrXC6yA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661537991; 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=TYNEQ3JlqzVXZBqdatxLNvwTJkcEX+VzU8xmOahkjnY=; b=zC34X9CkBUzFzQiH4I+I5sVs3e/7fltTJyZaftAnBr4eNnV8okO2mSPEQMijOqfww3QSxr cqWC2r84kDHpPMenjpGXyy20sKkxGTeM5DSPN5123Uqup8d4mE3KSOHzo37VgxOwzsronT Ywjqa1o3+3zDFDb4t0aoyJVnkMpclT0= X-Rspam-User: X-Stat-Signature: c979f3kjyqkgbfy911x6zutafxf1ayt4 X-Rspamd-Queue-Id: 089EA40009 Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=NPyVHEAr; spf=pass (imf12.hostedemail.com: domain of shy828301@gmail.com designates 209.85.215.179 as permitted sender) smtp.mailfrom=shy828301@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspamd-Server: rspam09 X-HE-Tag: 1661537990-690295 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 10: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. Otherwise, could we reuse(abuse) VM_MIXEDMAP? I don't think the mix is going to happen via regular mmap call.