From patchwork Wed Mar 8 08:33:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13165365 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 E938CC678D5 for ; Wed, 8 Mar 2023 08:12:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6426A6B0078; Wed, 8 Mar 2023 03:12:56 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5A6E8280001; Wed, 8 Mar 2023 03:12:56 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 46ADF6B0075; Wed, 8 Mar 2023 03:12:56 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 33BF26B0072 for ; Wed, 8 Mar 2023 03:12:56 -0500 (EST) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id EF68D80842 for ; Wed, 8 Mar 2023 08:12:55 +0000 (UTC) X-FDA: 80545015110.17.D12A155 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf24.hostedemail.com (Postfix) with ESMTP id E2903180014 for ; Wed, 8 Mar 2023 08:12:52 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf24.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1678263174; 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:content-transfer-encoding:in-reply-to: references; bh=BkHEPWrsRMk9q7J8Bp8maGYDsWSakbCS8E69BAK29+s=; b=Yl/oLxcYmcbY8mI3nnNM/aGNoH5wGNxq6ePFyBAB9k8U7mu0dtNdjHwbhgMlyMae9+KfHq 70+lEz2/sUgrK1n3HoPIcbh1bW/2ocyJd5L7XHqib8j+weap3IDRQpD2FRPhQVGCJHfhyI jBz8x8Pw6QPsSYU1hN9cu4smED90hig= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf24.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1678263174; a=rsa-sha256; cv=none; b=RBCAkJHrNbfjvOZsl7aefLontXkiVX+2GqAUMAG52mg+o6lVhjI5dGj1Cy2nEzFz+GLfWA dMFtiig/2+rrqw3CxhGLu6AUmN7UOVcKyzs5vB59t6ytgWxkOzg1FExPTw1PGUog5z5Pft qJDt811xed6kN3A679xfNSUfiZ5CDA0= Received: from dggpemm500001.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4PWlPF3jzmzKqMg; Wed, 8 Mar 2023 16:10:41 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by dggpemm500001.china.huawei.com (7.185.36.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Wed, 8 Mar 2023 16:12:28 +0800 From: Kefeng Wang To: SeongJae Park , Andrew Morton CC: , , , Kefeng Wang Subject: [PATCH v3 0/3] mm/damon/paddr: minor code improvement Date: Wed, 8 Mar 2023 16:33:08 +0800 Message-ID: <20230308083311.120951-1-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: E2903180014 X-Stat-Signature: 66msm8rookpepidy6g59zsgdtu9c9k5d X-HE-Tag: 1678263172-552176 X-HE-Meta: U2FsdGVkX18kRzpH0O3eyZISdY8rYTTjrqkzsL+IJeQMjq31NAgTB7OZ2uWDcljPoUliW9ACHDiRRC6FshKVSKQYdhRVIh2MIdQ5ohUlVk6KtS7p8MSoZOVmg505xIPgBbGJB9ohmekbiOMIU+1vp4myKEbdcbP+n69bxXaehIBvzZ0p5KcOlo3VOxeH+cLNG49sOxB84VGnnPG8z25yhuZOSEXGQT8UYayhTbMjBPK81avuOBQks+m8YrqCDwBxc3nne6u2IZdab/TkZI2GVmyqS2nCFrWAwhPW67U/yzF7umIYoiq4NZ9mbYw3205YNhxl4h0i5ghRr37QorDErJwqJs2awtVFXf0SNFUiAzsjs53cKFVBChT/+JqYY0dMfiVmN41pCiNYD/R+K8rOaQzvodnAvXJMUiM9ZvgRux60xSO3W7BuXLtO6ZNQrLkziWI/73ebvUmEkPnmdzPOo+24O1nHN15dL+6v0CfS5z15wZp9N5GA+Y1lGF/63RTHwD2yB5GL3b5P+GsrsMomui+tXWedQjOtnkxIzfkZIwsd4Ny/+qQkrtNdH+nuXx8a8JQMU56VIb3Ehxe9lMvK6DYWSFZEhOSoExICvNB0Dxr6LPJLP9e/H2iFdTTDrU2ZyzWj4Fr/pBLPZbKyfdIMsV7q93VuQMS1o6Ud0FzwLqu4vSLuoNu+17UsvdZOR+1+QwMRTf87YOnt62sD+8HsIZzlQn3/YNGCeVjyYXsSKYWxNUfV1tg+FqxuvTHaDW3P0hHO1zRiJm0MH2yuldztONfOXEIs+nwKp1UaC6Vx6RyEA0XA05l2zwznBbgIRo/GDwrJDdxH8B6JeZ+F5DFsMbWTqw/JKV+8iWFA34aCuWDGXvpopQd+I8hdz3aapy7vG7+3+QnK5hqGfstIAvV07DI5MR2sycgTi8ZME580vUaOq2BhbTqbqnxPzuARwJ5HhlGFMMQq886YT79ioKr 056CqFVw CjuDXLnsZ1rpHcuEDqqsOPCDLMNMH8OOrZv4IURVzcL50nhjgIAbB17NAxVRHJ/WGlW4SI2KGJBniD7LCV7WUWyO3Oqp3KNkLP/tyascAd2Iq5yb4VWIZJ9LtU5TYNzuLR3w1X4e2nMfTTJnQOzQk2deM+CVYCPmTJUUJ7T9wQDEgeddbHLZfXE9ZTiWANYVEPsXZ X-Bogosity: Ham, tests=bogofilter, spamicity=0.000009, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Unify folio_put() to make code more clear, and also fix minor issue in damon_pa_young(). v3: - as SJ split the bugfix from v2, and it has merged[1], only do code improvement - fix a missing folio_sz update in damon_pa_young() - add RB from SJ - rebase on next-20230308 [1] https://lkml.kernel.org/r/20230304193949.296391-1-sj@kernel.org v2: - use goto lable in damon_pa_pageout() and refact too more functions Kefeng Wang (3): mm/damon/paddr: minor refactor of damon_pa_pageout() mm/damon/paddr: minor refactor of damon_pa_mark_accessed_or_deactivate() mm/damon/paddr: fix missing folio_sz update in damon_pa_young() mm/damon/paddr.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) Reviewed-by: SeongJae Park