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 86D91C52D70 for ; Tue, 6 Aug 2024 16:51:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1E4E46B0089; Tue, 6 Aug 2024 12:51:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 195C36B008A; Tue, 6 Aug 2024 12:51:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 035C56B008C; Tue, 6 Aug 2024 12:51:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id D4D866B0089 for ; Tue, 6 Aug 2024 12:51:55 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id A26ECA61E5 for ; Tue, 6 Aug 2024 16:51:52 +0000 (UTC) X-FDA: 82422412464.12.F581D42 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf30.hostedemail.com (Postfix) with ESMTP id 8CFE98002F for ; Tue, 6 Aug 2024 16:51:50 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=QJeb4wwN; spf=pass (imf30.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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1722963079; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=/mCJXCJjs2Oa+lqZWj1oOLjxdvcWGqBpryPUVus180I=; b=X0jMoL7NPwPwud8u0ijpuJ7QLTjfyuHZTvo3MxYRv79719qvtolTPQU0rPBnDk2H4bmI0Y Obd33o76+5/uwGNly4T74R5eiuOxpBjMwYv3WoOAesLC9XXTBQNIlLDrUePaFI6iK1aR7j IHZu1peKrXsohHMikk/kq8eazDtAr/I= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=QJeb4wwN; spf=pass (imf30.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=1722963079; a=rsa-sha256; cv=none; b=Aw0XUFpjLeqSJsaDlLWnQdaEHgn4/m4jMLL2vTBKXfCItAktMSMS9M70Q9k1DuVq0GuweB ytluO5WM/VM0dH9QrYuCasOCOQc/Dz6HiCZWVWuSYZ4yrM/nXCm0hv/49GQ+gM+dBoC8qD YD37ykKwu2KmBEFyk1znZzpoQtCK8uc= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722963109; 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=/mCJXCJjs2Oa+lqZWj1oOLjxdvcWGqBpryPUVus180I=; b=QJeb4wwNrGJbUFf7trdNi8T+d/9fD15nrFfKvwGFOUMkyIUMZgporbMJu8y++rqf+2CAND RSt6LngCb+cxT4Zl74VoeDpFX0RKdHYEAi9hxbuuQcuUY6snNnyeIyH5pdjOlMuKnYxG9W PEvjBafDmJq6vFLnJmlR4eF+ZdCkBlc= Received: from mail-ot1-f70.google.com (mail-ot1-f70.google.com [209.85.210.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-632-T1bvtQy1NAW1oadBJW0Q5A-1; Tue, 06 Aug 2024 12:51:48 -0400 X-MC-Unique: T1bvtQy1NAW1oadBJW0Q5A-1 Received: by mail-ot1-f70.google.com with SMTP id 46e09a7af769-70954de6142so194638a34.0 for ; Tue, 06 Aug 2024 09:51:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722963107; x=1723567907; 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=/mCJXCJjs2Oa+lqZWj1oOLjxdvcWGqBpryPUVus180I=; b=WNBCXPWQcYtwLFORUuW66SBKqoKc+8W3Q3aXS3Ua6Y3/uO1tCfzlO0/zJGW7R9YKUR xKZZ/uq4l2pn/FM9ss5qmVWqk/VXiq2ccRaGvOaMGz9V50qONpKQGw3F3pKxCec9Elv6 9KU7hla/KRTB3Ot9fVCPOtP6KD6CummorCGYOqjnuvIOP134EegP/1+E1kKSV0MZ8QdG UavcOQkfBdd96gcRlQhpjjSsQ5V23EXvFY8ocDt+DTHfUFe6GHUT/KvAtoCTz4qgEHoo BV21kaVvoqYZPB7bRjvqConPWbkI3tHG4p/4fC+Ve0k+qYb6SOP8Ors5cEPVcSnne0vZ QZnA== X-Gm-Message-State: AOJu0Yy9WgE9kGCq+AW7QwGtKDu7DfwLQJpUttWsEJYuxdpyRQHuCUZq m9UjK2nwmN2DDgiC32fvEMSoOcW2KBV7WfxaYSuX2jj05SaN/TH/sgD0DzIuVT4TMmfellyk7H5 LAEIHHvCv+J8QBvOJ62uKqdc4tpq7oefyrPdPDdgIdnWFrcQE X-Received: by 2002:a4a:b80c:0:b0:5c6:6029:1568 with SMTP id 006d021491bc7-5d6455f39d2mr8735127eaf.0.1722963107391; Tue, 06 Aug 2024 09:51:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFbwac9k+Zg/Ro5fMGPCeM4WfaEKkODNlqWaBpva+fIizYSSXt9HO+Y9Im0OPLjbfFmriUNWQ== X-Received: by 2002:a4a:b80c:0:b0:5c6:6029:1568 with SMTP id 006d021491bc7-5d6455f39d2mr8735112eaf.0.1722963106982; Tue, 06 Aug 2024 09:51:46 -0700 (PDT) Received: from x1n (pool-99-254-121-117.cpe.net.cable.rogers.com. [99.254.121.117]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6bb9c83a236sm47898606d6.92.2024.08.06.09.51.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Aug 2024 09:51:46 -0700 (PDT) Date: Tue, 6 Aug 2024 12:51:43 -0400 From: Peter Xu To: David Hildenbrand Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Dave Jiang , Rik van Riel , Dave Hansen , Michael Ellerman , linuxppc-dev@lists.ozlabs.org, Matthew Wilcox , Rick P Edgecombe , Oscar Salvador , Mel Gorman , Andrew Morton , Borislav Petkov , Christophe Leroy , Huang Ying , "Kirill A . Shutemov" , "Aneesh Kumar K . V" , Dan Williams , Thomas Gleixner , Hugh Dickins , x86@kernel.org, Nicholas Piggin , Vlastimil Babka , Ingo Molnar , Alex Thorlton Subject: Re: [PATCH v3 2/8] mm/mprotect: Remove NUMA_HUGE_PTE_UPDATES Message-ID: References: <20240715192142.3241557-1-peterx@redhat.com> <20240715192142.3241557-3-peterx@redhat.com> <054324a3-bc77-426f-a751-06700aad394e@redhat.com> MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Rspamd-Server: rspam03 X-Rspam-User: X-Rspamd-Queue-Id: 8CFE98002F X-Stat-Signature: ufqnryss7efpfi63fnfnu3p86yesbigm X-HE-Tag: 1722963110-79634 X-HE-Meta: U2FsdGVkX1/XwjD0EhKDFigM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AIIvSw7Ncz3AkM+8TsRhpZAfo9k7Q1xntxm5J6Wy+MD7CtZ2bDpXeOM0MQm+5jmMDrsJmbWLlrlb4kPA1pWHWDoQrEf6pvMdmMlnXF0swkPyjlBY2OgXkPMzUsZUtXAhayuoQ49yqMfuBoods3kMUAwBI1bACxSVgNykeX9FNWcnHicT4WtOoMfsTGqvxGd+7XzO7osjr/3VME1g1we+YfyjFbjyTK+Z0kWklq8Cd1FrF55t3IdgyWqq5wTkhPapS47EfP+LEjrebimkB6pyT5xR2Rs= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Tue, Aug 06, 2024 at 06:32:10PM +0200, David Hildenbrand wrote: > On 06.08.24 18:26, Peter Xu wrote: > > On Tue, Aug 06, 2024 at 03:02:00PM +0200, David Hildenbrand wrote: > > > > Right. > > > > > > > > I don't have a reason to change numa_pte_updates semantics yet so far, but > > > > here there's the problem where numa_huge_pte_updates can be ambiguous when > > > > there is even PUD involved. > > > > > > > > In general, I don't know how I should treat this counter in PUD path even > > > > if NUMA isn't involved in dax yet; it can be soon involved if we move on > > > > with using this same path for hugetlb, or when 1G thp can be possible (with > > > > Yu Zhao's TAO?). > > > > > > We shouldn't bother about it in the PUD path at all I think. Especially as > > > long as NUMA hinting doesn't apply to any of what we would handle on the PUD > > > path :) > > > > Hmm, I just noticed that hugetlb was never involved.. but then how about a > > potential 1G THP? Do you mean 1G THP will not be accounted in numa > > balancing too even in the future? > > My best guess is that you would want a separate counter for that. The old > one was just badly named ... > > 72403b4a0fbd even spells out "NUMA huge PMD updates". > > > "NUMA huge PMD updates were the number of THP updates which in combination > can be used to calculate how many ptes were updated from userspace." > > ... which doesn't make sense if you don't know how "huge" the huge actually > was. :) > > > > > The motivation I had this patch in this series is I want to be clear on how > > I should treat this counter in pud path if it won't go. And when people > > compare the two paths we'll need to be clear why there's such difference if > > I ignore it in pud path. > > > > Per my current read on this counter, it might be an overkill to do that at > > all, and it might be simpler we drop it now. > > Fine with me. But I would send that out separately, not buried in this > series. The we might actually get Mel to review (was he CCed?). Yes he is. Fair point, let's do this separately. It's just that when split I don't feel strongly to push that patch alone.. no reason for me to push dropping a counter that maybe some people can still use even if I don't. More important to me is how I should move on with PUD, then at least this is fully discussed and ignoring is the option I'm ok. I'll respin with this patch dropped as of now, then I'll add a comment in the PUD patch mention this counter is ignored. Thanks, -- Peter Xu