Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp3289013lfo; Mon, 23 May 2022 00:48:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBiavhYrIammY0LahP4XKPldT3d9vUL8S1oyycUZ7T5j6uhg4VxbYt07z8ugtIMeVOMNVJ X-Received: by 2002:a17:90a:5908:b0:1df:1232:d47c with SMTP id k8-20020a17090a590800b001df1232d47cmr25302093pji.5.1653292100096; Mon, 23 May 2022 00:48:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653292100; cv=none; d=google.com; s=arc-20160816; b=0TjGpcwV1floXJHhpPMBeMbux5tA2bwgrJ7Oreog9jRDoLj/3si2BAWS7QrlXK1yXP nN1ZJS0PtRQOC2hjVFx19mQmdJztp42QCrx0yClQx27HWdGzKmoEG0DuCqTkvEg+1yvr kUqGtbx3UfbUZP35ow9KQ9+rum57GQmpykMTeP7RohEf57EeymOEhfdh5RQbKw2NVXao DbcQwSvuXVyfGCvVCbQ1duuUKBUZpxlejZM23XF/XFU4zwfRW5NVEbMU48d7f2GJXj+X Ue0tUJeFIKuu4gUkD2PRV+fjKBl/+NDJLeTQ1vpKn71PtNrD7TELU+SOiJOk7xA5dxkw /DaQ== 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=Fw+9k+RnzUdOacTuaz/2j5XVrSJD0gKIR+hhJAPt2rA=; b=vWlkoTisM4xrYecJHLEkAAMM0NA975bJ8lKZwk1f8ZWXGWHYSlU0ide4cR6ItEol8R AZeFOseLxHfxhVvlo4Q1XMPZ4NeWX49NnZJ82ztI46C2/yyX8Te49fCgqBr0+Pbwu4nO KloaTz7G8T6MUjTOnGHQ9tBAk2oINq5cX0OFojStnNZkvQY9GZJaL7TRKQC3NGykdXhO FrPuW/MM+bO6/skjRyjpaGC3zfJ2A/itCvteIGVD7euwtiijZ4/4aBkbNBwKHGmkIQlc 33p+hwbbQ/R1ZoRw3zCUnFSsSWl3O9aZjA51bnLZpUrACvpokw5sBi8z/QGkdSdIZ2xc rQww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=a7xYu2hI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q13-20020a056a00084d00b005108b38be1csi13724892pfk.80.2022.05.23.00.48.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 00:48:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=a7xYu2hI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3302F205F31; Sun, 22 May 2022 23:53:22 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232781AbiEUEDO (ORCPT + 99 others); Sat, 21 May 2022 00:03:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231240AbiEUEDK (ORCPT ); Sat, 21 May 2022 00:03:10 -0400 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B9431900ED for ; Fri, 20 May 2022 21:03:10 -0700 (PDT) Received: by mail-pj1-x1030.google.com with SMTP id f10so9547366pjs.3 for ; Fri, 20 May 2022 21:03:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Fw+9k+RnzUdOacTuaz/2j5XVrSJD0gKIR+hhJAPt2rA=; b=a7xYu2hI6iKpPF1XVlxTD+jspQwjfMuNseZfLel4/ieTzTjspooPD0zcJg7mO6AsK8 yRzFNmVHi+PdtQ1YHNaLDhe07dQvIGp7b7DZ7DbulB4mZuvtrowtfzWCJt650uDYd9Tx CbHKBzCQ0XekpzIXOGbU0tozG99YJlajFJZ4nvHOJymtNdLj4UXV6qdZ2mFXt3ettilA WqBuE97cR/8I69YuMpVNPt3fpWV/4YUfKO8Lds1CQ23gv2vZgGVF/a0ly6IsjRrG/Ngx 6BkBVCgJBCoAFQDS5Y5uGHTd+d2g3TxGmSeslDLaQ0sdNLmV2jc+TmasFRh9TASwRUr1 9PHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Fw+9k+RnzUdOacTuaz/2j5XVrSJD0gKIR+hhJAPt2rA=; b=hwj14tRlsmQxMi5OCGVztotHOEsQgs92/95+mRf4aQq9/Qlu1xqGYk/Tid4EkYsOb4 c3NYgfsYkQdwsKCAuzspgx5er6j6hBuyoSxrVncRgK4tEngz7zWvVGgGAYiZWJHQunE1 CLWYOmTNZtLQNgUja1yeiwcyFKoui+zLPOV8CWyenCwHS2PIBovKQf/BGtWnImXj0xBb dUjMt5KMOwTDdKT5wt9+v4ws7vyWGD18a/GGQ52ojYU8bdrjoAl0wuH5Gb2eZ6QeHxz+ zqJBCOIEiUqcR7BU2w7cKQemKYNX8Hs/e7eInWiwrc+3PtvwFQlNWB8z5o2+LMiMiNpS Jt9w== X-Gm-Message-State: AOAM530UsQaAr9znWk6Hti4E/hVbOQw26L7A5j2iO+AoOrNVL0SWobBV KkbinPoRTNegNDGWdPZNEO4t1ORxWyYrlA== X-Received: by 2002:a17:90b:1b03:b0:1dc:9dc9:2eec with SMTP id nu3-20020a17090b1b0300b001dc9dc92eecmr14495390pjb.37.1653105789578; Fri, 20 May 2022 21:03:09 -0700 (PDT) Received: from strix-laptop (2001-b011-20e0-15d4-84b3-8c62-a0b8-199e.dynamic-ip6.hinet.net. [2001:b011:20e0:15d4:84b3:8c62:a0b8:199e]) by smtp.gmail.com with ESMTPSA id k11-20020a170902760b00b0015eaa9aee50sm479287pll.202.2022.05.20.21.03.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 May 2022 21:03:09 -0700 (PDT) Date: Sat, 21 May 2022 12:03:01 +0800 From: Chih-En Lin To: Christophe Leroy Cc: Andrew Morton , "linux-mm@kvack.org" , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Christian Brauner , "Matthew Wilcox (Oracle)" , Vlastimil Babka , William Kucharski , John Hubbard , Yunsheng Lin , Arnd Bergmann , Suren Baghdasaryan , Colin Cross , Feng Tang , "Eric W. Biederman" , Mike Rapoport , Geert Uytterhoeven , Anshuman Khandual , "Aneesh Kumar K.V" , Daniel Axtens , Jonathan Marek , Pasha Tatashin , Peter Xu , Andrea Arcangeli , Thomas Gleixner , Andy Lutomirski , Sebastian Andrzej Siewior , Fenghua Yu , David Hildenbrand , "linux-kernel@vger.kernel.org" , Kaiyang Zhao , Huichun Feng , Jim Huang Subject: Re: [RFC PATCH 3/6] mm, pgtable: Add ownership for the PTE table Message-ID: <20220521040301.GA1508050@strix-laptop> References: <20220519183127.3909598-1-shiyn.lin@gmail.com> <20220519183127.3909598-4-shiyn.lin@gmail.com> <0c997fad-ec93-7531-f1c6-29e33f310ebd@csgroup.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0c997fad-ec93-7531-f1c6-29e33f310ebd@csgroup.eu> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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, May 20, 2022 at 02:15:12PM +0000, Christophe Leroy wrote: > > +static inline bool cow_pte_owner_is_same(pmd_t *pmd, pmd_t *owner) > > +{ > > + return (smp_load_acquire(&pmd_page(*pmd)->cow_pte_owner) == owner) ? > > + true : false; Why I wrote like this. ;-) > > The above seems uggly, the following should be equivalent : > > return smp_load_acquire(&pmd_page(*pmd)->cow_pte_owner) == owner; > Thanks.