Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp33269386rwd; Sat, 8 Jul 2023 08:16:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlEXWxpRqoz1XoCr9BEgGFGLzrwzAiIh5HfReXeUTrFpwPjYl9+mbgwqDlmYdocRsTqbfaeA X-Received: by 2002:a2e:8885:0:b0:2b6:e9e1:f62f with SMTP id k5-20020a2e8885000000b002b6e9e1f62fmr5545600lji.5.1688829407791; Sat, 08 Jul 2023 08:16:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688829407; cv=none; d=google.com; s=arc-20160816; b=f6BW1RDUtxSE+xRsjwaMQLRKQFMEPIx3T+KG7CLe7pvCHNMKKsBvqq7ZJlbmcYdV9Y paoiM6JQQN+8gDLQ8iuFG0aTG5ogExsow/V6i5z4hen1iFSReNwSfVRdHMKFISYTYZzT DgtL9Av6v1YtD5vuObIBRUY5ip/jwnhqJjHKd8BBTgY45o8Dd9oDDyHxs5jhXhlj+55u I/c3Gwmh0zoDv8SmXD0p1C5toxeG9LUYQ7rPL9d9VX7EUFOmhdlw9vGu9plHFylMs8rW qV7MF3VjrnvzoaLSpTUgkYYZYQsU5LVgXar4ZPOmLnFDQUTBEAui41Hu7Z/upZOt95b5 2edQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=vo+xktwiVBdnYZNSkVaZ1jBQzqcsS/NnXCqSzqSIy/s=; fh=JFh06cseEWykJOyW7rqDQuQTmKucUOCKf0clpziiyVs=; b=lYouYqBoAbbtuRG05bDFQvvRck2BsOxSuhoquseD0oLSpagi1oklW8sDU/dO3uOTtu jZ/fpBCgGFHKF/l9KyA0nBNQYx33/yMpZMg+zEaucEULxWsT7abEiJLK/HSxtisNa4SG g7a4Ua6uVwVZW5qD99AmJmlAF0/visDmpKrvKrAgRtFPNcUX/ETA4YP4/Jp4UNkoYU5s FbsRaFuEwwX4xeCVEJ9xvFE6gBgKaINqPKk9kvyul+/11x8y0rgmA6okOIp34wPfmY8k JdOUOPioijANowaPLuBy6sPM2YXHgj9qj3UNN5Hyuyp9FDP1IuzTv3oEa36T9osAa/jC ELbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BbqeYdLP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jo17-20020a170906f6d100b00977e10fafd3si3525164ejb.1045.2023.07.08.08.16.24; Sat, 08 Jul 2023 08:16:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BbqeYdLP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231240AbjGHPBh (ORCPT + 99 others); Sat, 8 Jul 2023 11:01:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231192AbjGHPB2 (ORCPT ); Sat, 8 Jul 2023 11:01:28 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71D90D9 for ; Sat, 8 Jul 2023 08:00:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688828443; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=vo+xktwiVBdnYZNSkVaZ1jBQzqcsS/NnXCqSzqSIy/s=; b=BbqeYdLP1JwSGDVXcyeT8FjIPFD/H/5WWbz5nEhl5RF6/ApR0jqBp6Y4g5vjFugT+UfMSu kQUONUlivpD457kWkNEzv12zEJFKkA1qL1RJsKIfkusBV4bPv22hqmXG/mSmBUt2HWRBe5 vQakVt/su68/+Is7wnltkOE3SrQ/5Eo= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-563-BFD4cX80MwCf143KOpNGZg-1; Sat, 08 Jul 2023 11:00:41 -0400 X-MC-Unique: BFD4cX80MwCf143KOpNGZg-1 Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-6364867fa8aso5981746d6.1 for ; Sat, 08 Jul 2023 08:00:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688828441; x=1691420441; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=vo+xktwiVBdnYZNSkVaZ1jBQzqcsS/NnXCqSzqSIy/s=; b=CpPsxY6Xa1UUHyQeyIVFDQFPAa/3amcNDlOL5PN7KKimCnZG3JiiI35Iw56tRd+k8O Gw413kkMCBrHxLIfcGFgWqTbLmQ/zA6Qgs6xVBK91Ks80sVSOZLSb+aQbbxsFQF6t4q2 +A8dg2WbjxhfAhFUU4lOsqDYj2da6Mj/Mj1oJgKWbbRQczhsXXHXGTceLglbRSSmRY2C VHoE9gr5Tvg+qNW03t6Rdy1PmkfVZNYFNTtsXKwh/ay+cXWICqv6o0uxI+5oFQNlo9rd hc4jVBieNOiGm41PT7vGxFkuodoXs5klhA1kWISDCEydXclzZM89eE5bMXgvYz+ZIiMM l3gQ== X-Gm-Message-State: ABy/qLa/8UquQlpVWGKrNRb+m4iXnsVauqJ7Wim3JOAiKrPHioYX48ah AF79MaULe84gqLAhw0HPhsHsoTGPQjq6UsQzsqI9BIrG1nDtZHRzPjMn5cyJaZFm38698u1nW04 JP+8YG5VD2Er9uGoJPJ5YkClB X-Received: by 2002:a05:6214:20cc:b0:635:da19:a67f with SMTP id 12-20020a05621420cc00b00635da19a67fmr8751528qve.1.1688828441401; Sat, 08 Jul 2023 08:00:41 -0700 (PDT) X-Received: by 2002:a05:6214:20cc:b0:635:da19:a67f with SMTP id 12-20020a05621420cc00b00635da19a67fmr8751500qve.1.1688828441141; Sat, 08 Jul 2023 08:00:41 -0700 (PDT) Received: from xz-m1.local (cpe5c7695f3aee0-cm5c7695f3aede.cpe.net.cable.rogers.com. [99.254.144.39]) by smtp.gmail.com with ESMTPSA id e12-20020a0caa4c000000b0063627a022b0sm3467336qvb.49.2023.07.08.08.00.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Jul 2023 08:00:40 -0700 (PDT) Date: Sat, 8 Jul 2023 11:00:38 -0400 From: Peter Xu To: Axel Rasmussen Cc: Alexander Viro , Andrew Morton , Brian Geffon , Christian Brauner , David Hildenbrand , Gaosheng Cui , Huang Ying , Hugh Dickins , James Houghton , "Jan Alexander Steffens (heftig)" , Jiaqi Yan , Jonathan Corbet , Kefeng Wang , "Liam R. Howlett" , Miaohe Lin , Mike Kravetz , "Mike Rapoport (IBM)" , Muchun Song , Nadav Amit , Naoya Horiguchi , Ryan Roberts , Shuah Khan , Suleiman Souhlal , Suren Baghdasaryan , "T.J. Alumbaugh" , Yu Zhao , ZhangPeng , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v4 1/8] mm: make PTE_MARKER_SWAPIN_ERROR more general Message-ID: References: <20230707215540.2324998-1-axelrasmussen@google.com> <20230707215540.2324998-2-axelrasmussen@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230707215540.2324998-2-axelrasmussen@google.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 07, 2023 at 02:55:33PM -0700, Axel Rasmussen wrote: > -static inline swp_entry_t make_swapin_error_entry(void) > +static inline swp_entry_t make_poisoned_swp_entry(void) > { > - return make_pte_marker_entry(PTE_MARKER_SWAPIN_ERROR); > + return make_pte_marker_entry(PTE_MARKER_POISONED); > } > > -static inline int is_swapin_error_entry(swp_entry_t entry) > +static inline int is_poisoned_swp_entry(swp_entry_t entry) > { > return is_pte_marker_entry(entry) && > - (pte_marker_get(entry) & PTE_MARKER_SWAPIN_ERROR); > + (pte_marker_get(entry) & PTE_MARKER_POISONED); > } These two can be slightly confusing when put together with hwpoison entries, so maybe it'll be good to somehow attach a "marker" inside the names: make_poisoned_marker_entry() is_pointed_marker_entry() (the old helpers didn't attach a "marker" keyword because we started with consuming a swp entry type, I think) But we can still identify easily with "hw" prefix being there or not, so it's still pretty clear at least to me. I'd say not worth a repost, so your call to keep or change, just in case a new version for other reasons. All fine here now: Acked-by: Peter Xu Thanks, -- Peter Xu