Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3786445rwd; Sat, 3 Jun 2023 11:55:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ48AFH2AjctG49HrW+8bze7zSRkOP3+ltbg01uWT1ze5u1VGoJv57jvvroYVjMnefYD0Cem X-Received: by 2002:ac8:570a:0:b0:3f6:b34d:e38 with SMTP id 10-20020ac8570a000000b003f6b34d0e38mr2181583qtw.16.1685818517358; Sat, 03 Jun 2023 11:55:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685818517; cv=none; d=google.com; s=arc-20160816; b=wmhS4vXR1r6YG8uShkUrBpbmY4Y6Gt/Ci01oeg2kCDs42/sDIj1+WjAYEM6vxVSI1v 4swYKSQnX1HF/UVxeTdy6g5kdwkGMxWHpTKWzZLaHQKhp1IYs/QV1cwDt1w7V3UWqdr5 O1SHru7HKpPvpRhZe0M8Hrz9xp1Fz/C4ZbjUDNq/xixNcm32gPEsqCS0/7Ydmp3Co3Ay 1CDg1oEz8Lr5wU0CnkxhOZi0Lz7MVEbM9UGc9u7T9wzi6i1WJZu73DZB4xyVbXJD2BWY aGEzWlL5HL5o40nWSJwfk71zfiRlHe03i2/wqslCSeULTRcpTmpu4tqc6u1civ6C7SLn il/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=SUPNwj70fpmi1q+gV3ozTJqTRJJKllEsiR6aLkKPQzo=; b=qpzx/aGsJdJIuA8P81t40oxDrEKydA7/As8oFUzDlG/b1DRhHpa8PNuaqprisOji6d 5qKBta4bxIyZ+v9vfQiqUpSs6QiHHngyCzLsSE6ZSUIxGpolvIQE05A1wXl01X5AYXN9 NngGISmzyYRLMRKDGSJw3QbVQ9Q67TVLMpM4S3QJN2v26mQBn9nhuYpzks0n2jYCba4h J/2pgno5afqPF7ggUT9xyQqh4P2uoVfSgJ2dE63xilypFPVGGvLLxY/wjECz1NTszJnu 2xV5iTLjY/3kxBzCxUHUjShpHuIMD6IdLmE0mAlw34lXspeVTF+pOBCvlUUo9Z2UeE0r Roxg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i62-20020a638741000000b0053f2551834esi3140321pge.735.2023.06.03.11.55.05; Sat, 03 Jun 2023 11:55:17 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229490AbjFCSUk (ORCPT + 99 others); Sat, 3 Jun 2023 14:20:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbjFCSUj (ORCPT ); Sat, 3 Jun 2023 14:20:39 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 45ED9B9 for ; Sat, 3 Jun 2023 11:20:38 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4633EFEC; Sat, 3 Jun 2023 11:21:23 -0700 (PDT) Received: from [10.57.72.226] (unknown [10.57.72.226]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1260F3F793; Sat, 3 Jun 2023 11:20:35 -0700 (PDT) Message-ID: Date: Sat, 3 Jun 2023 19:20:34 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH v3 2/4] mm/damon/ops-common: atomically test and clear young on ptes and pmds To: SeongJae Park Cc: Yu Zhao , Andrew Morton , Christoph Hellwig , "Matthew Wilcox (Oracle)" , "Kirill A. Shutemov" , Lorenzo Stoakes , Uladzislau Rezki , Zi Yan , Mike Rapoport , linux-kernel@vger.kernel.org, linux-mm@kvack.org, damon@lists.linux.dev References: <20230602214347.85694-1-sj@kernel.org> From: Ryan Roberts In-Reply-To: <20230602214347.85694-1-sj@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 02/06/2023 22:43, SeongJae Park wrote: > On Fri, 2 Jun 2023 19:15:01 +0000 SeongJae Park wrote: > >> Hi Ryan, >> >> On Fri, 2 Jun 2023 18:14:25 +0100 Ryan Roberts wrote: >> >>> On 02/06/2023 17:35, Yu Zhao wrote: >>>> On Fri, Jun 2, 2023 at 3:30 AM Ryan Roberts wrote: >>>>> >>>>> It is racy to non-atomically read a pte, then clear the young bit, then >>>>> write it back as this could discard dirty information. Further, it is >>>>> bad practice to directly set a pte entry within a table. Instead >>>>> clearing young must go through the arch-provided helper, >>>>> ptep_test_and_clear_young() to ensure it is modified atomically and to >>>>> give the arch code visibility and allow it to check (and potentially >>>>> modify) the operation. >>>>> >>>>> Fixes: 3f49584b262c ("mm/damon: implement primitives for the virtual memory address spaces"). >>>> >>>> Just to double check: was "Cc: stable@vger.kernel.org" overlooked or >>>> deemed unnecessary? >>> >>> It was overlooked - incompetance strikes again! I was intending to cc the >>> whole series. >> >> Not the whole patches in this series but only this patch is intended to be >> merged in stable series, right? If I'm not wrong, you could add >> 'Cc: ' tag here[1] when resending, to let stable kernel >> maintainers easily understand exactly what patches should be merged in the >> stable kernels. So, you wouldn't need to touch coverletter or cc whole series >> but only this one. >> >> [1] https://www.kernel.org/doc/html/v4.10/process/stable-kernel-rules.html > > And I just found Andrew added the tag while adding this to the -mm queue. > Thank you, Andrew! Yes indeed - thanks for fixing that up for me, Andrew! > > [1] https://lore.kernel.org/mm-commits/20230602205509.9DFBDC433D2@smtp.kernel.org/ > > > Thanks, > SJ > >> >> >> Thanks, >> SJ >>