From patchwork Fri Mar 3 08:43:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13158395 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 5C76BC678D4 for ; Fri, 3 Mar 2023 08:23:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 814C16B0072; Fri, 3 Mar 2023 03:22:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7C60A6B0073; Fri, 3 Mar 2023 03:22:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6B39B6B0074; Fri, 3 Mar 2023 03:22:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 58B8E6B0072 for ; Fri, 3 Mar 2023 03:22:59 -0500 (EST) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 12CA81210FD for ; Fri, 3 Mar 2023 08:22:59 +0000 (UTC) X-FDA: 80526896478.12.56980BC Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf23.hostedemail.com (Postfix) with ESMTP id 8950F140012 for ; Fri, 3 Mar 2023 08:22:55 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf23.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=1677831777; 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=z/eoHUbnLLvX2Vfz6vLz9tYjjrkJrA8SYbsQCZ17V5o=; b=tgXRgaZeoZ2vuWCSFFh/SFtBVthrlPh4jyoqo7ECbUfgBjK2PkMzsvbFtd858jHzF0bmTx 0JS82Q1Xa+2IKbTYINH4+QSNJHYWx1zIdEZSoP/iNUR8+ZAiB+CZBEA9vvPTsGurLZ5OpJ QR2vDEMdOISWZIg6BJjLCCKvAHBVKfE= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf23.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=1677831777; a=rsa-sha256; cv=none; b=Pw1Fg1mMIOetGu8OFKhaXzijQMnFkCmsiuSghYlXy2Aa5VnCcZz74XuaR06q6vLjP4P0oQ BSEknI3fO8tCnK9FXFm3fv9V7TPUzepZBAyKZtFfaRRM66O1tkcUSag8Q+9LC+NtoHfkqD ZMn9IozNjvyjXkj6zT/YDrcIa6ljh+A= Received: from dggpemm500001.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4PSgr53cdczSkdP; Fri, 3 Mar 2023 16:19:49 +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; Fri, 3 Mar 2023 16:22:46 +0800 From: Kefeng Wang To: SeongJae Park , Andrew Morton CC: , , , Kefeng Wang Subject: [PATCH v2 0/3] mm/damon/paddr: minor code improvement Date: Fri, 3 Mar 2023 16:43:40 +0800 Message-ID: <20230303084343.171958-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: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 8950F140012 X-Stat-Signature: fqjci9gx5k7warec1aea854b344m1jfw X-HE-Tag: 1677831775-981412 X-HE-Meta: U2FsdGVkX19cbagtHztxXyzWyaw8J69t4JSr/kpIidC8NfPLBH0+4HqVTCp2uDeSQwkjYV5gMOsLhHx1hQb4MNrJv8Efb5tx1g+C4lS2wQ5tg5s8Vo70ipINeNhhZ4b6fHEM2w7QIxFzwAvJ9ozX7PFNSpFS411jTwuc1vOknpLwMX1jTKKBHYKGlLJCsgguBuVLDUEVjfP2qvUd2KSUbESjJixdGTCgp/iFHBhQcmTWeeHzMOlVKLzJsR8RPECcpfyFwy0Xr4LPbGCc0CDMNshkD1YwOj1uCDpspNXtyRK+Iegcr/nw/EWD8P6Gnnk3v7jTMOd9II5vCgD7tU964tB52n7JwvxDIfBA6ORedADPUo0NEdNj6E4+VZLyfRC37YoyfcGAFu+7xb9PCoWoklixzLTOBV/AIO0UmXsIC4/wMI9emw0Y8jjazgs61jtKEHEC/mNTAqxYTNJtlY7WrJ0XSLwwk5dj9U7h4FXbKo+ekn/jVbovr10IXD69mUvkGrbRYSuXH7zSacKagU2+CEY5EErtZ8b65SAyXjArmmOOnm97M+6Z2wFwRMNQjg9g9WtPstAKqtrKwOFg2TP8TDogesLTasKWsvqIjtXJ9wcKRIcSP1oTZMJ4CytSNQ5CayUv7XPaiBvaGzmpJ48gvBDwCvrHvWit+5wLuePk0KiM2jUhiO1bT9ZTTEqsrNaAwhIlXgFFgYDbpfyBeW+Kdc5L+zL/bo/T90Tw+TERjbV88qEL+3D+7WzhuMGKP8+UaPChqFRZ3j6SleU8yilknYiCBN/6eewGpOrIGy3mZEJ/ZyHtf0AoSEPtLlTfk85PY68+WRUi9WWxRVQAonRjHx21WQQhTnHza+ZOlk8OoOkUyArzpVE6rF96MzNZqi84PsSqCYNWOQDuz/n5l007xudmHzUxAaPPzadkg0zvt6GQY+k1g5LBUQbjdiyA02B7Fe6u+zb/Q7fMLRQXt9h ZUeSZyaz 5/N/9vAt2kAMOwSBapBYKV423S7uLV+4zuFNTEevrGZtSljFqNCcsAbkV4tvkoFdVRAUmtZvaHetzeDirLkRVvgb2FF+lt4QYZjB3aWb0IGhR1CElTAPRdhyPcYT2CO3GkSssokOBHEbDe/M= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000252, 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. 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_young() mm/damon/paddr: minor refactor of damon_pa_mark_accessed_or_deactivate() mm/damon/paddr.c | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-)