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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C0C6C00144 for ; Fri, 29 Jul 2022 22:43:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 003716B0071; Fri, 29 Jul 2022 18:43:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EF45E8E0001; Fri, 29 Jul 2022 18:43:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DBBEC6B0073; Fri, 29 Jul 2022 18:43:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id CABD16B0071 for ; Fri, 29 Jul 2022 18:43:08 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 9BF611C5F2E for ; Fri, 29 Jul 2022 22:43:08 +0000 (UTC) X-FDA: 79741614456.01.74A0BDF Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf15.hostedemail.com (Postfix) with ESMTP id 908D0A0026 for ; Fri, 29 Jul 2022 22:43:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659134587; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MkC15PF7q6Qv3Sepf8HquYF3f+S1q84ieK1T4smZvQg=; b=hEO+h0eSu1VAu+1QAWOF0t4HtL1CKAZ6XY+G2Dcog/kdi5FfVPAJxKo7NMdEI9bLEXq9CD WLMQrrWYqhzQFkH46j9m0n8F7/ONk1xMe+nZ6sWpie9wyL7MvDAZ7HBa8AeqeR/E5da950 xV4G1DwXILlAjvREAnfIPWr2Ms0GaDQ= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-454-CLBBFBfhPp2onqZxh4kJRQ-1; Fri, 29 Jul 2022 18:43:05 -0400 X-MC-Unique: CLBBFBfhPp2onqZxh4kJRQ-1 Received: by mail-qt1-f199.google.com with SMTP id u12-20020a05622a17cc00b0031ede432916so3616675qtk.1 for ; Fri, 29 Jul 2022 15:43:05 -0700 (PDT) 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:content-transfer-encoding :in-reply-to; bh=MkC15PF7q6Qv3Sepf8HquYF3f+S1q84ieK1T4smZvQg=; b=BoVq5fNhcHLcA2oPBCb0UC3QLc2L1f/yIdBaD3yxee8w1fU7qO/4fWMflY9EEigtWe i8i/5fD2SSYaRkkSlujOQE+sBdJfzXOpmAlPen2kjhdaExm6x1jP1DFc8r3/pxe8kmz3 jO4miUWP7otgQ7jPxIm3wyfsTyrXUvYkkBFIr0wMn9HwZWTvFXGox/oTfctVu5vfUIvu 2BvMgYXIZiInbV4QydULAfBSc/qatyqq5Ku284ooqaPH95M3g9dMpsA3Fw2698J17/nY dqakFuG1AMC3TT9FdN6pvKQ3b41IdAEI8iP6AjcPbi7tTX2uy4x+FfspFsSKzhV6jt2x Vm9A== X-Gm-Message-State: AJIora/whi1Sghag4MN5b+ptvfdEq/17WPBBZMFjBm4U8WWPmhrv8zdR HzRrzS6fMm1S0elizReKwbz0uM6IB+n0AxuhQfMoAXxxKJuclU9jNAGETNwKg/NF9XlIoIQ3D4o DFFC54RQQFuU= X-Received: by 2002:a05:622a:209:b0:320:7960:eae2 with SMTP id b9-20020a05622a020900b003207960eae2mr5411437qtx.239.1659134584905; Fri, 29 Jul 2022 15:43:04 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uG7n4r5EftF9w+1QyxPriRl9nrQYP7B8faEUrbCjv47fkaB6Nc2jItUbipdNlSUOY/LzwvsQ== X-Received: by 2002:a05:622a:209:b0:320:7960:eae2 with SMTP id b9-20020a05622a020900b003207960eae2mr5411425qtx.239.1659134584668; Fri, 29 Jul 2022 15:43:04 -0700 (PDT) Received: from xz-m1.local (bras-base-aurron9127w-grc-35-70-27-3-10.dsl.bell.ca. [70.27.3.10]) by smtp.gmail.com with ESMTPSA id az20-20020a05620a171400b006a5d2eb58b2sm3409261qkb.33.2022.07.29.15.43.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jul 2022 15:43:03 -0700 (PDT) Date: Fri, 29 Jul 2022 18:43:02 -0400 From: Peter Xu To: Nadav Amit Cc: Linux MM , LKML , Huang Ying , Andrea Arcangeli , Andrew Morton , "Kirill A . Shutemov" , Hugh Dickins , David Hildenbrand , Vlastimil Babka Subject: Re: [PATCH RFC 0/4] mm: Remember young bit for migration entries Message-ID: References: <20220729014041.21292-1-peterx@redhat.com> <6C0B267E-E36D-4014-8308-B948247D7FED@gmail.com> MIME-Version: 1.0 In-Reply-To: <6C0B267E-E36D-4014-8308-B948247D7FED@gmail.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=hEO+h0eS; spf=pass (imf15.hostedemail.com: domain of peterx@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=peterx@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1659134588; a=rsa-sha256; cv=none; b=BETFflKpkR52HVwoBX+hl0XYAEzKurUf1iWDy9mZNy7esQa1Vt1DfbrliqlqoSZhJeEvTZ aDEwyGeWkxXWDo/oTRuImzBYYCRqBUPab2mjwW8GoKVMAn6zYLNG0z5SQlepM/Dnlkl6V8 eexum3Juyga4ywX3QboV9fVRFfcaqVk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1659134588; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=MkC15PF7q6Qv3Sepf8HquYF3f+S1q84ieK1T4smZvQg=; b=fEITGSwuJn6AjhE8GadGXXuw7khVhtikey/P7Jy2mlrNSaDAUfwHyBJpKxR8ER5hjxMx/F 3UESwN4bifklPB7pXJLjz1gN1SPItTxnQ47s7vnrPemmgX8lejaVBR9y6qVZciVz/EbSkD LkA3eIvFtUh+YvnrYe0PKAhW+szhy8s= X-Stat-Signature: 9rjjxqnsmyj8u6w7tzhsdjut68inerf3 X-Rspamd-Queue-Id: 908D0A0026 X-Rspam-User: Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=hEO+h0eS; spf=pass (imf15.hostedemail.com: domain of peterx@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=peterx@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Rspamd-Server: rspam02 X-HE-Tag: 1659134587-701049 X-Bogosity: Ham, tests=bogofilter, spamicity=0.002686, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Jul 29, 2022 at 10:07:02AM -0700, Nadav Amit wrote: > On Jul 28, 2022, at 6:40 PM, Peter Xu wrote: > > > [Marking as RFC; only x86 is supported for now, plan to add a few more > > archs when there's a formal version] > > > > Problem > > ======= > > > > When migrate a page, right now we always mark the migrated page as old. > > The reason could be that we don't really know whether the page is hot or > > cold, so we could have taken it a default negative assuming that's safer. > > Looks good to me. Thanks for the quick review comment, Nadav. > > I just wonder whether the order of the patches should be different. I always > understood that separating the “enabling” patch from the others is not a > good practice, since it complicates bisection. I guess it is more of a minor > issue for such a small patch-set… Yeah I'd guess you mean when there are a bunch of patches to form one feature, then we may want to be able to know which part of the feature break something. But as you mentioned this feature is mostly implemented in patch 2 only. I can squash the enablement patch into the same patch, but when comes to more archs it also means I'll squash all the archs into the same patch. I'm just afraid it'll complicate that patch too much - I'd expect each calculation of swp offset for any arch may not be that straightforward enough, so it'll be good if they can be reviewed separately and carefully. -- Peter Xu