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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1647FC38A02 for ; Sat, 29 Oct 2022 02:50:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229742AbiJ2CtR (ORCPT ); Fri, 28 Oct 2022 22:49:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229379AbiJ2CtP (ORCPT ); Fri, 28 Oct 2022 22:49:15 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B7D51DCCE6 for ; Fri, 28 Oct 2022 19:49:14 -0700 (PDT) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.54]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4MzkJc01cGz15MF4; Sat, 29 Oct 2022 10:44:15 +0800 (CST) Received: from [10.174.151.185] (10.174.151.185) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sat, 29 Oct 2022 10:49:11 +0800 Subject: Re: [PATCH RFC 2/2] mm: Use pte markers for swap errors To: Peter Xu , , CC: Huang Ying , Andrew Morton , HORIGUCHI NAOYA , David Hildenbrand , Andrea Arcangeli References: <20221024204830.1342169-1-peterx@redhat.com> <20221024204830.1342169-3-peterx@redhat.com> From: Miaohe Lin Message-ID: <6357f4ab-32f1-3654-9a18-deb4f5364a92@huawei.com> Date: Sat, 29 Oct 2022 10:49:11 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20221024204830.1342169-3-peterx@redhat.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.151.185] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/10/25 4:48, Peter Xu wrote: > PTE markers are ideal mechanism for things like SWP_SWAPIN_ERROR. Using a > whole swap entry type for this purpose can be an overkill, especially if we > already have PTE markers. Define a new bit for swapin error and replace it > with pte markers. Then we can safely drop SWP_SWAPIN_ERROR and give one > device slot back to swap. > > We used to have SWP_SWAPIN_ERROR taking the page pfn as part of the swap > entry, but it's never used. Neither do I see how it can be useful because > normally the swapin failure should not be caused by a bad page but bad swap > device. Drop it alongside. > > Signed-off-by: Peter Xu Thanks for doing this. I have been waiting this for a "long" time. ;) With changing the name of PTE_MARKER_SWAP_ERROR proposed by David, this patch looks good to me. Reviewed-by: Miaohe Lin Thanks, Miaohe Lin