Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2655788rwd; Fri, 2 Jun 2023 12:35:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6l22565MLz+wgo0J7x6MGg8wGg7N+ZKJzQ6562YYt7f5ckHJTspFsvKNbYSMOMIo3eyHC+ X-Received: by 2002:a05:6a00:21d6:b0:63d:2d7d:b6f2 with SMTP id t22-20020a056a0021d600b0063d2d7db6f2mr14082680pfj.4.1685734522439; Fri, 02 Jun 2023 12:35:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685734522; cv=none; d=google.com; s=arc-20160816; b=NSwHzKx//QpC3gM1lYiu6hOoWHHh19ZK3Ps877hLz67qlN/WypXY+GeSJEhBHgWmE0 NrkgszTGm71ExCrjDuist8lhtMBcaB+XekEeu5nk8rkGidiWDsH1rFAjX2vtF9+iOJDq CI18sH8Zp8hT8VoO/CCQ+rr7RfeU7bstUtxn7CUH5qjbM2te41MfG2bEFN7usXFp1404 OJ+RPLrE+Yzc9LsRqHU5zPYLOAFHuxHsZ3O0NOzPd5A3nRkofZo5lQ4Z6XyouW8PrtHe yfUh7yq85jphGWRH5V1lCKiTQgLeXSJespt5aaHDSp/ZT99044KGOtG4URmM7kc+6cjc o9tA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fN/h00i5wYL6JtuOATZZ747oApeD7xq7K3mNFDv0eW8=; b=VC1u+Kd6Kan968nY8Ifk3zGPuRhOb5/hzPxDem3v5tnW6FmQKOSw3m9pwR0QzNxanf PMvpaqlFW2z+jSAwYnjATVajvoIguw3XAqEtX5mtyvob6I060T07BvttpZj6x46ZIEfk gs9C+mE9+FtZb+oAHN2aTpYpVgTo0im6my4gDJu+5qYsuZhEYvCk/3lPbS0tNxKJyOQS wcJCyxVzk1rVrrXMmsE9dwwJM2bA9ltF/ZUqM8i7k0CTmawuDrT9wphVlg3lHI7RcnjN O8KJE8qba+uOPVfFyHqgJ81TC4KcduaTkOLd7q9IM71pHbsgw2mYYs2NF/gPAc6x0RnB sTjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VyrSXRqu; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w185-20020a6262c2000000b0064d2d8d7c33si1196708pfb.45.2023.06.02.12.35.10; Fri, 02 Jun 2023 12:35:22 -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=@kernel.org header.s=k20201202 header.b=VyrSXRqu; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236813AbjFBTPH (ORCPT + 99 others); Fri, 2 Jun 2023 15:15:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234942AbjFBTPG (ORCPT ); Fri, 2 Jun 2023 15:15:06 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 544FA1B9 for ; Fri, 2 Jun 2023 12:15:05 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D7453652B6 for ; Fri, 2 Jun 2023 19:15:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C52DC433D2; Fri, 2 Jun 2023 19:15:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685733304; bh=nvI5b9+cPLi2PS/bEHgXWPypYY86IfgngWve0OOt7NE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VyrSXRquTV2qNouSGpvHl+kfHGft0KqVV/S9F2uqljKRYIVKfNWB5wjnKBCafZEKY qpNrG4qUV923ZQ0jIOXAPyVfKn/UMm65epFbuDDl79DspGaIRvjzssBFoan3gnvsHR ExuMGhjci67ldTTmrTjD4Ou7O5XGNoJwC+kVRkqSi89heBGnKhaTkikovA7eOjMMrN oiKRR5E+h63p+YwoDFUHEyiqCgd9/xw+M/g7X3lmd5+94pWWIzEsbOlJTpVG1XHcsd DkfKxrJCGjHxFajPCJEnydxcEsCy2URDBud+z5fFDkZBvIyQrvaIbqX28hOjk8T1GD 17x4x3kDyfJGg== From: SeongJae Park To: Ryan Roberts Cc: Yu Zhao , Andrew Morton , SeongJae Park , 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 Subject: Re: [PATCH v3 2/4] mm/damon/ops-common: atomically test and clear young on ptes and pmds Date: Fri, 2 Jun 2023 19:15:01 +0000 Message-Id: <20230602191501.85553-1-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <640f81aa-035e-9f42-c848-096e4c9e014c@arm.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,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 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 Thanks, SJ > What's the best way to fix this? Can I just add stable in cc on reply to > the cover letter or will I have to resend the lot? > > > > >> Signed-off-by: Ryan Roberts > >> Reviewed-by: Zi Yan > >> Reviewed-by: SeongJae Park > >> Reviewed-by: Mike Rapoport (IBM)