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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65034C433FE for ; Thu, 24 Mar 2022 02:47:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347844AbiCXCso (ORCPT ); Wed, 23 Mar 2022 22:48:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242681AbiCXCsm (ORCPT ); Wed, 23 Mar 2022 22:48:42 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8D88939CC; Wed, 23 Mar 2022 19:47:11 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id bx24-20020a17090af49800b001c6872a9e4eso3768781pjb.5; Wed, 23 Mar 2022 19:47:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=90v/5Py9W7EAZEot7188HYCPw8B0VfqItjFqNp0yU8I=; b=dxrv0V3AiE2m0/WOX54xvV5yxB0eJv9FvLmxGfHi84fR/RWgBOp4yXdDNToYvyAawj kFAqEG2QtJP6dJm1A/UKmq+1eB7PdUAV/zCkGhgbi9FbsP45vrQ9Soh8L719JjYtuwIg N8NN/8zPbZSLvzEiIEYCgbzuHQ3nWPE/VgE7HlJAPPawvyRDtRTBtdnSAeEjeXLRRFJY hF4aVeYUjd1A+GEfDEvARaNz62S+hP9Rhjqv1hfCPw9ceQkOiviCfxLNeiibnjpNAGNi /6516352cSybYQDMu2cYXhPHBes/c1Nn7vARgXL0a/M/f8rTpmQpxgaP5aNDcNn0GcUs QfDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=90v/5Py9W7EAZEot7188HYCPw8B0VfqItjFqNp0yU8I=; b=L+Nkts2qPDy28GS2t9yQVU9DCQCizPhOys0HQG12B6SJ1XWGlFlFx8bi41rtihAc7u SxHlRpN3m5QDWwTzWK4IrpjM8/va7gN8nUsnb385S0vHSv+RHL4H7agXmRRxanby//d6 /Ke9oBd/6P9gQY25ZNFhi2P6FbBHGTnnlz3STl3DOfbjE3xIsSq2QVdUxyLCoootMnzU Cbf574csqaVdregMOf0+FOlyVv2HiSYbV3eMJLFYXov7eJ1mEedIoNh8ftXxgD6bcTqI 2HjMZ9rbT4Agz1a5vaLjd6g4pi8Zgo5PTMCkeWQ4MYJg9uO8Mlimihe5KFi1ZlwEn2k3 NBDg== X-Gm-Message-State: AOAM531iqzff1cAlAU97hVhfidLAinJRwh1xDXqSq7SIAFL8vnZ2AgHW 5/5wIPNPNcLJS25BXLSFTTuZCWQACPBzXEak0Hc= X-Google-Smtp-Source: ABdhPJzEvjnYd7B0WIGRcPh8gW/FvpiuSCSRc80jOwhBs6SPVLjct24P89mwBuS0aVh2B9zE/pT9CUr0CDpyaw6jaGg= X-Received: by 2002:a17:903:1cd:b0:154:5edf:5704 with SMTP id e13-20020a17090301cd00b001545edf5704mr3481459plh.26.1648090031398; Wed, 23 Mar 2022 19:47:11 -0700 (PDT) MIME-Version: 1.0 References: <20220317234827.447799-1-shy828301@gmail.com> In-Reply-To: From: Yang Shi Date: Wed, 23 Mar 2022 19:46:59 -0700 Message-ID: Subject: Re: [v2 PATCH 0/8] Make khugepaged collapse readonly FS THP more consistent To: "Theodore Ts'o" Cc: Vlastimil Babka , "Kirill A. Shutemov" , Miaohe Lin , Song Liu , Rik van Riel , Matthew Wilcox , Zi Yan , Andrew Morton , Andreas Dilger , darrick.wong@oracle.com, Linux MM , Linux FS-devel Mailing List , linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Wed, Mar 23, 2022 at 6:48 PM Theodore Ts'o wrote: > > On Thu, Mar 17, 2022 at 04:48:19PM -0700, Yang Shi wrote: > > > > The patch 1 ~ 7 are minor bug fixes, clean up and preparation patches. > > The patch 8 converts ext4 and xfs. We may need convert more filesystems, > > but I'd like to hear some comments before doing that. > > Adding a hard-coded call to khugepage_enter_file() in ext4 and xfs, > and potentially, each file system, seems kludgy as all heck. Is there > any reason not to simply call it in the mm code which calls f_op->mmap()? Thanks, Ted. Very good point. I just didn't think of it. I think it is doable. We may be able to clean up the code further. > > - Ted