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 95B60ECAAA6 for ; Fri, 26 Aug 2022 17:53:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EB6626B0073; Fri, 26 Aug 2022 13:53:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E660C940008; Fri, 26 Aug 2022 13:53:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D0626940007; Fri, 26 Aug 2022 13:53:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id BC8D36B0073 for ; Fri, 26 Aug 2022 13:53:49 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 93DBAA0562 for ; Fri, 26 Aug 2022 17:53:49 +0000 (UTC) X-FDA: 79842491778.10.0B25F19 Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by imf08.hostedemail.com (Postfix) with ESMTP id 4CD7F160011 for ; Fri, 26 Aug 2022 17:53:49 +0000 (UTC) Received: by mail-pj1-f53.google.com with SMTP id bg22so2301409pjb.2 for ; Fri, 26 Aug 2022 10:53:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc; bh=C39YH9wCpEQR+pl/ijY0j0Ej8V67ygLspgT2qzrDbTo=; b=MGmhbo6ihznVSJD09engd2Uc4sl60eMsDvU3G+kOaFi3DNiieoMa4PRVPAtOGKqK3m NjCwRR2edi+iwoU8v73yyIhhOxZDPZ5pHmd6vb4jq9fQCDHE++2G7r+3MKlML2DTbfaz 19iSffyf329g2jv4EVnvzPaAQwCT119iVqw9xVEfVonA0T9fEGDzSNINcKC0VABHETml iVjyfiFCIi/zk+h6nekbl+ci6Qk7OzkiQfXqyNfaHaJWygq7gAP+H3sCuMhs/3uI83zv AH6Ce4QHtimFaAu6CIdHeVfjg35yl6yawLZtxjzO2TrmFB7t9HfV65NCxP/+Pa0v82D7 /g7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc; bh=C39YH9wCpEQR+pl/ijY0j0Ej8V67ygLspgT2qzrDbTo=; b=4H9r3eJJXAfLVbithyFhuHr35bpdY5d/fNZdG/9nTIDxSIXbm8iskked4ODOipQzBC PBWstZyOtRoDwmJusI8bGMnGFotyouxs3RrpoZ9V4mVLhDvYkX+rcr1RMuEf8cZ5NeJ5 m2xzlosDNkv1H0ZL7rkmXMJyGjOP5oWjpjFm78nJ/ny3MyRMqyDa8k+9j997+Jslyc32 b2Y8MeQ9WtKMlqI8vPaljhW5UiQxTYWA5WjUoq8yU1ueAmJYzQj1z0k9X66pAh5q1ay9 ISzETrfPWzARIUIMbnICoef/qfDf3ozFxqNwpBBjrLHh79hTFW37OF09JboFySORZy3b mvSQ== X-Gm-Message-State: ACgBeo2GW+Bh6wjh6C8/RVfHTBx4/LIbLvJskKKkfVdFuqwnNvWYpmov J/i3l+o93enF0zkv3Qiv9BBVSIzocbk= X-Google-Smtp-Source: AA6agR5h2VOFYELLtn06ejt7CTHh17+4hZbGigEt66x+d13OLc8Irssui6AB1KrXjZGVXXYKIUx9SQ== X-Received: by 2002:a17:90b:2c06:b0:1fa:e636:105a with SMTP id rv6-20020a17090b2c0600b001fae636105amr5529910pjb.169.1661536428315; Fri, 26 Aug 2022 10:53:48 -0700 (PDT) Received: from google.com ([2620:15c:211:201:60eb:6401:167f:b157]) by smtp.gmail.com with ESMTPSA id j6-20020a17090a7e8600b001fbb6d73da5sm1979476pjl.21.2022.08.26.10.53.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Aug 2022 10:53:48 -0700 (PDT) Date: Fri, 26 Aug 2022 10:53:46 -0700 From: Minchan Kim To: Yu Zhao Cc: Matthew Wilcox , "Yin, Fengwei" , Yang Shi , Andrew Morton , Linux-MM , =?utf-8?B?6Z+p5aSp56GV?= , mawupeng Subject: Re: (resend)WARNING: trying to isolate tail page in isolate_lru_page Message-ID: References: <485f8c33.2471b.182d5726afb.Coremail.hantianshuo@iie.ac.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=MGmhbo6i; spf=pass (imf08.hostedemail.com: domain of minchan.kim@gmail.com designates 209.85.216.53 as permitted sender) smtp.mailfrom=minchan.kim@gmail.com; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=kernel.org (policy=none) ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661536429; a=rsa-sha256; cv=none; b=AjX1dkVBEPGUYhgIKj+yFKgY414Baci6B3b+72qaQwT51LkLYBX6CviowdHCcuvMgJPfL3 8KsDdxRQ4/ZB6gt9XxoZdk0K6nvZJZb0JqNAwsDi2B/0zNYOTUqcBhZPJcxBq4GPNX6wVx giM6TTQ0+mtqVXrOIWgIAdK2X1Y28wQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661536429; h=from:from:sender: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=C39YH9wCpEQR+pl/ijY0j0Ej8V67ygLspgT2qzrDbTo=; b=7t7Zga+eTiuvd1S9T4QtbWX8iusbplJf5KIxt3KHyGqL7FV+4YJe5NE9q52PVDUOZmNVVh Qudmlirvqb7A0JrLLcuZpu8JXyQhRj+EXL3KRerY6kT3s/w+ICB5zL7tfoFbtUBEjlZ0dt KGBYsKLj4XUc+BndCDDUj7f9Bs8x3s8= X-Rspam-User: Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=MGmhbo6i; spf=pass (imf08.hostedemail.com: domain of minchan.kim@gmail.com designates 209.85.216.53 as permitted sender) smtp.mailfrom=minchan.kim@gmail.com; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=kernel.org (policy=none) X-Rspamd-Server: rspam07 X-Stat-Signature: a5m5aybxo45omu9w4crpe6ojx5kmsm4n X-Rspamd-Queue-Id: 4CD7F160011 X-HE-Tag: 1661536429-277221 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: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?