Message ID | 20221219185840.25441-1-ryncsn@gmail.com (mailing list archive) |
---|---|
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 B9819C4332F for <linux-mm@archiver.kernel.org>; Mon, 19 Dec 2022 18:59:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 03CB48E0002; Mon, 19 Dec 2022 13:59:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id F2EAB8E0001; Mon, 19 Dec 2022 13:59:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DF7118E0002; Mon, 19 Dec 2022 13:59:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id D12478E0001 for <linux-mm@kvack.org>; Mon, 19 Dec 2022 13:59:13 -0500 (EST) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 9AB62AAB9D for <linux-mm@kvack.org>; Mon, 19 Dec 2022 18:59:13 +0000 (UTC) X-FDA: 80259968586.22.7C8136E Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by imf25.hostedemail.com (Postfix) with ESMTP id 0609FA0007 for <linux-mm@kvack.org>; Mon, 19 Dec 2022 18:59:11 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=L5GgSLXn; spf=pass (imf25.hostedemail.com: domain of ryncsn@gmail.com designates 209.85.216.48 as permitted sender) smtp.mailfrom=ryncsn@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1671476352; h=from:from:sender:reply-to: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=hZhRIzBqxXMa6fseg6CkSAdY583EaojUpyztij/imbw=; b=VXlXo01m0CyXRR1oll0JlOrwHmiDeSEgFGeka5/pBjC9j7ZQiPKmdANRfNWTgKqwV7vWNu lqtUtbGLWH3lbDxQRDSxBG6aA5UB15zfCnawnLCb0zZa/sk27966+sAIf3S5ST7hN2K2rA Cy8+//CvJQPnEa3g/by4cb4bBCowtdU= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=L5GgSLXn; spf=pass (imf25.hostedemail.com: domain of ryncsn@gmail.com designates 209.85.216.48 as permitted sender) smtp.mailfrom=ryncsn@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1671476352; a=rsa-sha256; cv=none; b=cPb0G0eQ7d/WU5VliNJ0YUj0X6uwSbFEveDMgNVDeFL6Tj1TF0SnJ8n8+npHcsjt22Ll5E oLZTX+1HzHgnVVPhKtelSUwwkoCz3X6VXmXJw25AOFPsBage81lwhZvhGOinX1fAf2Nren TdSCq10YL2eIP9hLDKv2zGkgofMmc1o= Received: by mail-pj1-f48.google.com with SMTP id t11-20020a17090a024b00b0021932afece4so14043630pje.5 for <linux-mm@kvack.org>; Mon, 19 Dec 2022 10:59:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:reply-to:message-id:date :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=hZhRIzBqxXMa6fseg6CkSAdY583EaojUpyztij/imbw=; b=L5GgSLXnzhMaLVMaVYqX/Ybe1XCcGXDDtaD3Zsecc+djwJkvd4W7SFk3kXZI9VL8GG fLZ0Pm7qkspJmgcSfzSP0P9e/RtiEm9XcEirRerUb632pq75N9YtQlnv7VUfmw/vSA4w bkOyL+aAJAbGH65LZ+yY4IOissL4Kj3TUlqPFJToWB/s5oFZ3JlqTnIr4VzWlPdxm4+C FFa33NoXBmU+GaOg7SWFs7lbolkJK51YJghVomJjdxmPEHEYq0TSBdSGww7r3GjCtvxi bn1/7bsHhU12L5sxiMng/lr+TToZIefy0EimnCxUelw3Makg3diT2w9IaXPb/+fmcrfU s17w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:reply-to:message-id:date :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=hZhRIzBqxXMa6fseg6CkSAdY583EaojUpyztij/imbw=; b=QiVhZVVNqqArTCNmEbxeJmOzibx6uY3OTji1dt5ZeJ5dwXl26L1xZ6OQfA+kFHGUeQ C0zzHKWvcfOEVG7CegAvOvDcXz765wLBlqSi3xz7lCaOzmeNmLgp1AC8sEyZEctHWBMP koadQYPp3GfqCKrTJoRfquBfT0IPRDOhNr0eV2Css/sPYFq7p/oW+O7MOcxjJpMsfnIT dHhzxTv1yfqGhDoTCPTxzYd1qMVF7a2w8EqSIy9R+EaI5tRn9ZRVlyjxfzpqD+/JJxvv GYCcs5l8+g6iJ1yKFNBKpvNkW4aAYTviOsHQk/sVnEJTMzpiT/9umTlBOgPGg6Q9xfek m6Yg== X-Gm-Message-State: ANoB5pnAcfZlg1RmWJ0q4woVqSqfmM+JvGpQiuIPJ4esyCWF8UZb6jXs osBLbcIEXUwbcf9pCrCWpjK+NiiC0xgqDQ== X-Google-Smtp-Source: AA0mqf7cG+2pSZEZzrZjF7usvC+PtSqvx/z18btb9yJDbRy4HTdlmHkv8p/lgdx0ebdSgmUp/msLpw== X-Received: by 2002:a17:902:f64d:b0:189:603d:ea71 with SMTP id m13-20020a170902f64d00b00189603dea71mr44135292plg.58.1671476350218; Mon, 19 Dec 2022 10:59:10 -0800 (PST) Received: from localhost.localdomain ([198.13.51.166]) by smtp.gmail.com with ESMTPSA id i6-20020a170902c94600b00189847cd4acsm7480790pla.237.2022.12.19.10.59.04 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 19 Dec 2022 10:59:09 -0800 (PST) From: Kairui Song <ryncsn@gmail.com> To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>, Miaohe Lin <linmiaohe@huawei.com>, David Hildenbrand <david@redhat.com>, "Huang, Ying" <ying.huang@intel.com>, Hugh Dickins <hughd@google.com>, Matthew Wilcox <willy@infradead.org>, Kairui Song <kasong@tencent.com> Subject: [PATCH v2 0/4] Clean up and fixes for swap Date: Tue, 20 Dec 2022 02:58:36 +0800 Message-Id: <20221219185840.25441-1-ryncsn@gmail.com> X-Mailer: git-send-email 2.35.2 Reply-To: Kairui Song <kasong@tencent.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 0609FA0007 X-Stat-Signature: 8weme4ci18noioqf577omnm6befyqyqi X-HE-Tag: 1671476351-631408 X-HE-Meta: U2FsdGVkX1+mKzUxe9dEkAdKD7jna86I2cf1whdMXnAvbCQf41DqEdmr+shbrz3VKRKnOajBVPd57dBf/7Vwu0dW/t19gyVg/n4s+XZfKOGqwKjhmOnTQ5IWkbyu7XrgTynThfxhNrks6Q+DpsF//61jWWuPtHkZg/BUeMfStG0cKTrQ0cexXOCTly0Yd3923jtHKFONoGtw3M6PXie692upHxA9XP+B4cEIJ4x10oWnyn2TE2Tw2ikpNsnV5ZoEboJ56Ebo8SNy17+6Cbyj7JOd9Nizb0AZZIawzuKHJa/2VkNCO7+FAq1t9ekjk+UQjJtj0lpRT1x2B1wmZ1Ib8OYodvwZcMExbOkxU1iRP2fMq7IpG228FwdbqZGH5K+vf6e9cyt3kRgrfBP9rpS0mh6KM5kyeRy09fEKk1aFDbrBKxxMzby4IXT31DvIVU/hvQwzOg24PAq81XFKI7Ixzdf1bUxcKOSukccxSDil58Dpb6kdnkhMUs0f0SnU+zmcOfboK9NLGo3x1jXLLFP5i2QXFQLGvXKgR8MnqlTAC03+/HucuS8rFlTasTwbnzcKhiSD6QXLQMMfHb43JqKE619ft28kJKI/EE1HrkGmn35W3D2MTkpmoZSvaenfQAvc9jhHhBpIRamU5TlwUzlfuN9XFkoBQmkgyjeROTYwgO9AE5K4eo8EFTGAjo48wXnJYUwe2xtAxmRfqeoMnRfuiuwKh3m8jySDX3oMFWh+0x3/U41vCPacQjcjZfOjvxfbCK2qdtkq26AdlkNiKHaqrLGVGtjTQWmRnIGAXOpEY8tDTGr0UkXu1XAyFDjaMO1xF1UFmgzamhHgpPoxoWfGjoPeofYoqOK8cENQZrDnFcYSQrdb0W3UmUtOF62IfZeprClRj8lQK7DGTqL1E41hYvfsUuvFSsFbNz9zHW0wIsT5qHFS9KzD6JPIdknASs/TKh10tcm0Oy9xYlTeXaM cc/qrYZL 83d8I5hqJPlvnLg7TtOtm/CQBYLsqXUMd/XNPHgsKo/Rxa9dDW0Kvm+YT81tzRPA4i6tMGKMavLCGN4zbT1arIRI9UX1GT8VO6NAx1ss7ksvsZfbm4sX+QGWuTTaG7QmJIekXK6sxwmMVcwlnRqQ6WIsTps7C/MVOEZP+stHAEeQe9FjpxpwoQXNXm+YsfoNZHSe1YKDOIz4UoXDTw+aElSB1wFeScv5qXgNGWtjpdGA5TJRqzBnOKr05GvsZimr/veDmNiU/UARUH/xPOhz7mf/4TA== 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: <linux-mm.kvack.org> |
Series | Clean up and fixes for swap | expand |
From: Kairui Song <kasong@tencent.com> This series cleanup some code path, saves a few cycles and reduce the object size by a bit, also fixes some rare race issue of statistics. Update from V1: - Collect Huang, Ying's Reviewd-by. - Use bloat-o-meter to show size change info in commit message as suggested by Matthew Wilcox. - Rework patch 4/4 as suggested by Huang, Ying. - Drop a previouly invalid clean up patch. Kairui Song (4): swapfile: get rid of volatile and avoid redundant read swap: avoid a redundant pte map if ra window is 1 swap: fold swap_ra_clamp_pfn into swap_ra_info swap: avoid holding swap reference in swap_cache_get_folio mm/shmem.c | 11 +++++++++ mm/swap_state.c | 59 +++++++++++++++++++------------------------------ mm/swapfile.c | 7 +++--- 3 files changed, 38 insertions(+), 39 deletions(-)