From patchwork Mon Feb 6 15:30:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yin Fengwei X-Patchwork-Id: 13130096 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 04B65C05027 for ; Mon, 6 Feb 2023 15:29:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5808E6B0072; Mon, 6 Feb 2023 10:29:00 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 52F8B6B0073; Mon, 6 Feb 2023 10:29:00 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3F72E6B0078; Mon, 6 Feb 2023 10:29:00 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 2FC306B0072 for ; Mon, 6 Feb 2023 10:29:00 -0500 (EST) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id EC9DE16030C for ; Mon, 6 Feb 2023 15:28:59 +0000 (UTC) X-FDA: 80437249998.04.7C27E62 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by imf20.hostedemail.com (Postfix) with ESMTP id B5AEE1C000D for ; Mon, 6 Feb 2023 15:28:56 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=Tn6emuj2; spf=pass (imf20.hostedemail.com: domain of fengwei.yin@intel.com designates 134.134.136.126 as permitted sender) smtp.mailfrom=fengwei.yin@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1675697338; 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-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=z3wv1rE4iQPVS9izRS86UTeBsPHtFH2XRe1c7TeKIPA=; b=kDDkiKWMz6mmMqgNd3DhMPrZ/Nny4kysnrBWr6+Rr8yLpuGWxiaU91og8KyhFqpobve1G2 COiGbi+/zwbqZ0yIbOUERuWRwC836zf5FH9Aks/CE06bK0CEBJZ+W446Lm0wEXnuHVwNF2 a0XBIHn91pP0F8DqAl26mNlIZH0D73A= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=Tn6emuj2; spf=pass (imf20.hostedemail.com: domain of fengwei.yin@intel.com designates 134.134.136.126 as permitted sender) smtp.mailfrom=fengwei.yin@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1675697338; a=rsa-sha256; cv=none; b=Ks5hlhffwsWCcS0BV+VlRBrG8ppMra3PR+RMBFtC9MIXgUWL0UbJBW5TbXIQ+L4NWggWD+ eqPJiGKlLx8vAkJVKPNJWsG9Nf7o9o8+psHXBUSO9f6sNqrxU7TtPZCkeMlUWFM1ZYd/bq chGTZkn/hhfz00epLxpXYiTS+KLHwiA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675697336; x=1707233336; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=x2BFXEGfAWL5xoypqB2XblLg2XFLyqoSl+jrhDNmdUs=; b=Tn6emuj2AObCa1fwGYG3RMfq0/xk3FZ0FZrWKc2dSxQPbCWhAFmaVAMf I2F9PfHeHk8mVgReLVWa6m+G1rg+45RpPkM/wD05b9z7MO6PRCarqnBRH KOkWsNhmUYYmN18vbTEeEBfe0wfcaqjAUxRwSvWKmWx12vLCU9tobRD1i TijVjl1j/1CqO4aEY5D/MwZ05lwe4lNoEWh5Rc+fjh3PoBToUo2UEgdTB GGteglgSiCA0PIhy1HFTHQT/SNfgIVnkU40NRdbVIpZwt7JdVQavMSh9j O5MQ5qKQcDSNlSFK5I+mcIfolTGBUep3PXXDxkggXSyNhlwTDnT2Gkzsa g==; X-IronPort-AV: E=McAfee;i="6500,9779,10613"; a="312884020" X-IronPort-AV: E=Sophos;i="5.97,276,1669104000"; d="scan'208";a="312884020" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2023 07:28:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10613"; a="840381218" X-IronPort-AV: E=Sophos;i="5.97,276,1669104000"; d="scan'208";a="840381218" Received: from fyin-dev.sh.intel.com ([10.239.159.32]) by orsmga005.jf.intel.com with ESMTP; 06 Feb 2023 07:28:53 -0800 From: Yin Fengwei To: willy@infradead.org, linux-mm@kvack.org Cc: dave.hansen@intel.com, tim.c.chen@intel.com, ying.huang@intel.com, fengwei.yin@intel.com Subject: [RFC PATCH 0/2] remove parameter 'compound' of add_file_rmap Date: Mon, 6 Feb 2023 23:30:47 +0800 Message-Id: <20230206153049.770556-1-fengwei.yin@intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: B5AEE1C000D X-Rspam-User: X-Stat-Signature: oyc5t91yfewyesprmyjyju4p8c5pawog X-HE-Tag: 1675697336-616900 X-HE-Meta: U2FsdGVkX18T7tKJU2RdMF3Hu5BoHJ0aBfTL+sqzKfvyp3OcHFHD+J4YLrl96FazYAVgOPy3TUyZOnkiTfVEzhqZlw+b1nr5iNHkgcZSAGudMsV4vEpzuGO5yAgJCNGE4rkMdF6pCsl4giOJYqXjsH0lf+JWlClegE2GMEpqmZ+09EPzzdFtJXQdpomF2sTGqOy9eRjyiJjP6WylWFFXY0B9yoYOqo6vljkSI+nB+Ny7P8r4EQJZiWfX36rXyNxElKAv2HV32Ms/HhshoWAT7keITnzNAosNwFvxe8nc59LJiC0rOLYKspo3NHUCafChE6McMQbpGEwilhE2ReQxGgnACBn4X2cfzEyCggzLyl1fa1azNqhAnmt5lZw2tf6m2J8D9K78aXUqnazXw7U8Ehb4fMtxwkUa2t1U9UPBmms79g6NQEMQOIkMUg5WfETff2pMIcH4vmVqBA2qadgq0ffB7lxjUquwdWqYbV9V98ZIpsez8NMzoxCh5l/mZrDsIknii8783ukoO9RHWOr8LJ8xIxzvemLoF/wJRcGdrCLBKQ6V9R4r1+3n6SPNsEzfXoPbSclRM/N8PETEk+FFRc6UBaZgPhprPy0JaIM8a732157zN+1NGPAXFk/BLRCO/SJbJsj6cBJMXa5mLrrmTEgfTxKqtnEo1jAoRdHg0h2/yM9IYnvyig8QR6ifF+61YVkGpQQ5NPbVH3bqTqQQJgJKWTp8H5EggtEFPkfEA8ZnCKCer/RHKqT0YPwxiZiJN647jZq6ezrYPHl/i9v8Ru45NJA4nFHjrVHm7aosf4z1mDY87yy39TgnvhIXyxxuEE04hoCnkMsgnOOzfDejrsX2JLH95OPRr5HVCQAaQJORHUryoLdypVBi3W/axtmeFAfX8rEhgZXHrLt0WypgrPr951+npRTY4LR7vj2khHUoRtOpYB/97aPJqk7ulJ8ZRNFpX0x2afFmdCQ0cSf LyyD4Ii8 44nvpaqQdRIalIM5mo12ymDXEoDVQ+OSbaqr6gLzte5kgGS2TrV92IXyfdTTXgrmnvFumbRk03Xr92dT1Qz4P3xA6LlM2zn1WuAo6YLU0/SPDTRO5fM10P93Bb0DKUSUMr8dOencIH4TXgF2tWsHYhhOkGcItSOLjViNHf0JHRw4qwggug1s2F5uNUHU1OOR40lo2 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: This is follow-up patch of "folio based filemap_map_pages()". Matthew suggested to remove the parameter compound. Compare the folio page number and parameter nr_pages to detect whether it's a 'compound' operation. Didn't remove 'compound' from page_remove_rmap() because it's not ready yet. Just did very limited test: boot to xfce GUI and used browser, email client and Linux kernel build. Yin Fengwei (2): rmap: Add function to handle entire folio rmap removing rmap: remove parameter 'compound' from foeio_add_file_rmap_range() mm/rmap.c | 82 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 56 insertions(+), 26 deletions(-)