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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7E58FFA373D for ; Mon, 31 Oct 2022 01:41:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B0DA06B0071; Sun, 30 Oct 2022 21:40:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id ABD366B0073; Sun, 30 Oct 2022 21:40:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9ABC46B0074; Sun, 30 Oct 2022 21:40:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 76A776B0071 for ; Sun, 30 Oct 2022 21:40:59 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 1EB761408DB for ; Mon, 31 Oct 2022 01:40:59 +0000 (UTC) X-FDA: 80079541038.17.25CC8E1 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by imf24.hostedemail.com (Postfix) with ESMTP id 287F1180009 for ; Mon, 31 Oct 2022 01:40:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667180458; x=1698716458; h=from:to:cc:subject:references:date:in-reply-to: message-id:mime-version; bh=0d6fpLM6CUu9xahsDVfbZewVAzPugiU00xgBhAaG790=; b=MQmFX2ixaPdL/90xuvsUO2rIiZ0jV/kFzaONw3+WsRg4m1qLdkmowIwT O4UQitwMwNia2Ya+OrORv0fJMAdH7vRH7Oj2tx8hvOERbgwh9nWJleGfo JQLbC31weK/c9zaeyolmL9oH9pe2FNyhYbffUFDBE6GY1Yo1juIeeJx7j oWT1gp5Rc0YAnVZYSc5SSYNt0KHGRqhqDYP8HLoMrpIqPi6hz7/yzoYZQ al/eHojCMSZGeLzcloHc95nD1KDu+NSVSpWmVmNzgz9TyjsMn5X94oqqI 6zdQY76so+/OcZbdi4BW4H7bhjWFOOxE8ZiCsaVZyIg0CR2ef4xqErVPh A==; X-IronPort-AV: E=McAfee;i="6500,9779,10516"; a="370868305" X-IronPort-AV: E=Sophos;i="5.95,227,1661842800"; d="scan'208";a="370868305" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2022 18:40:56 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10516"; a="635883353" X-IronPort-AV: E=Sophos;i="5.95,227,1661842800"; d="scan'208";a="635883353" Received: from yhuang6-desk2.sh.intel.com (HELO yhuang6-desk2.ccr.corp.intel.com) ([10.238.208.55]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2022 18:40:54 -0700 From: "Huang, Ying" To: Peter Xu Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Miaohe Lin , David Hildenbrand , HORIGUCHI NAOYA , Andrea Arcangeli Subject: Re: [PATCH 0/2] mm: Use pte marker for swapin errors References: <20221030214151.402274-1-peterx@redhat.com> Date: Mon, 31 Oct 2022 09:40:15 +0800 In-Reply-To: <20221030214151.402274-1-peterx@redhat.com> (Peter Xu's message of "Sun, 30 Oct 2022 17:41:49 -0400") Message-ID: <87h6zkepog.fsf@yhuang6-desk2.ccr.corp.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1667180458; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=VKfxOJlahPRIQqXhAPIS3lQ42mIdlv1lIyYkirBvSDI=; b=Z9EUOCFrXtMEJ2EXmo5HYuJrDFePGJPrJb3+9GRh5xAh3vQH7uIbBSaGxTD3+KNnJTnjfR SeBucYFtbhOKsbiXfuigmmN4PIPgYLl4Y2B0UNvRjTgZecciX5A7K4Aapfw5dzBmJNYptx YWSCNdhP1ClTsdex9rLwmQZFrzgCjns= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=MQmFX2ix; spf=pass (imf24.hostedemail.com: domain of ying.huang@intel.com designates 134.134.136.31 as permitted sender) smtp.mailfrom=ying.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1667180458; a=rsa-sha256; cv=none; b=KfFSIISkE/Xds8Cy3kC0I/q11761WLW7XhQxij+yvYmXRe7j++GL3HDAwXe1gm4+QxqwQ7 9wghm4HWJTnDcjtTgwMV6WwcOOvQ2juSHkmezhj8GY5MtF/iCauk8U5Ljr3NeZG6AqlIxV hyUAVY8p5Vn+UJOhsxvTIi2Y1KVsxNw= X-Stat-Signature: y5ffpmxr39rnppym4awsmwgwoenyatcy X-Rspamd-Queue-Id: 287F1180009 Authentication-Results: imf24.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=MQmFX2ix; spf=pass (imf24.hostedemail.com: domain of ying.huang@intel.com designates 134.134.136.31 as permitted sender) smtp.mailfrom=ying.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com X-Rspam-User: X-Rspamd-Server: rspam01 X-HE-Tag: 1667180457-130346 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: Peter Xu writes: > rfc->v1: > - Rename SWAP_ERROR -> SWAPIN_ERROR [David, Miaohe] > - Added r-bs for Ying and Miaohe > > Hi, > > This series uses the pte marker to replace the swapin error swap entry, > then we save one more swap entry slot for swap devices. A new pte marker > bit is defined. Per my understanding, "swap entry" describes one swap page (4KB on x86) in one swap device. So, the original swapin error implementation uses one swap file (or swap device) instead of one swap entry. So your patch saves one swap file (or swap device). Best Regards, Huang, Ying > One thing worth mentioning: we need the pte marker to be always built to > make sure it works like before, so I made an attempt in patch 1 to drop > CONFIG_PTE_MARKER and always compile pte marker in. Since pte markers are > enabled in many distributions by default already, meanwhile the codeset is > really small I assume it's fine. But still I'm tagging with RFC for this > initial version. > > Smoke tested on anonymous mem on a fake swap failure. Please have a look, > thanks. > > Peter Xu (2): > mm: Always compile in pte markers > mm: Use pte markers for swap errors > > include/linux/swap.h | 16 ++++---------- > include/linux/swapops.h | 49 +++++++++-------------------------------- > mm/Kconfig | 7 ------ > mm/memory.c | 13 ++++++----- > mm/shmem.c | 2 +- > mm/swapfile.c | 2 +- > 6 files changed, 23 insertions(+), 66 deletions(-)