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 4804EECE58C for ; Mon, 9 Sep 2024 23:15:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 901EE6B0250; Mon, 9 Sep 2024 19:15:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8B0916B0251; Mon, 9 Sep 2024 19:15:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 778B86B0252; Mon, 9 Sep 2024 19:15:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 588CE6B0250 for ; Mon, 9 Sep 2024 19:15:45 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id D3E2D1C1821 for ; Mon, 9 Sep 2024 23:15:44 +0000 (UTC) X-FDA: 82546759008.17.42365BB Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf16.hostedemail.com (Postfix) with ESMTP id 297AF18000E for ; Mon, 9 Sep 2024 23:15:42 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=xpK8zwiy; dmarc=none; spf=pass (imf16.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1725923667; a=rsa-sha256; cv=none; b=N6Xy3pr4DRxYr0q3CEqh/LuxkyA3FJw2TGvyjVbnb+k+0bo4kESOKjW+vDog7WDYko5Z1f lWbAO9E2TiV6NWMe8GPxbo7UGQtNaTYVEYhq8cDDCHgKlTocP3mgHHAAk04aW9DHZL5ItV qnriN9J9NRb5w8wBLNdDQo4RRr9i2xE= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=xpK8zwiy; dmarc=none; spf=pass (imf16.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1725923667; 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=tJY7hQfSgnpfFgsX1qQtt1Z4K47TIVxeyt/GZXza9eI=; b=eiHnHhjmSttoVjjO7iBd3RKrNP7EOm54Sg9ZfzOsARuzhk/TTb/I5Qqi01cqz60DSSFN3f TUaaw2hu8azj2rs4Mzlgwb+YI1s45NU9FNz06femHHsyCaOOS0SqzOu46xqmDeJ9hRcS9m XYZG6x7c0FMlCPcVzv+VSrE9ZKtJeZ0= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 85B9A5C0206; Mon, 9 Sep 2024 23:15:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F378EC4CEC5; Mon, 9 Sep 2024 23:15:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1725923740; bh=luzSVNn4nvUpJ3QTHAb9p3Ik4ksmlSH5EahYohflukY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=xpK8zwiynZ0m10l28wwaoK+1o2zr4ZpU5iOoMkokRROxfrxRyELqVTZEUovGd/OEJ BgcTq+oRgsNSSWq7xyNkhCkJZ1n41LiFfwEJ40POx6cYmw5lXT7uh73qEtwdf4jqpC RuUgUXEA7PrIpIpQl8f40lD53HvGFdEUMWh3JpcI= Date: Mon, 9 Sep 2024 16:15:39 -0700 From: Andrew Morton To: Peter Xu Cc: Yan Zhao , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Gavin Shan , Catalin Marinas , x86@kernel.org, Ingo Molnar , Paolo Bonzini , Dave Hansen , Thomas Gleixner , Alistair Popple , kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sean Christopherson , Oscar Salvador , Jason Gunthorpe , Borislav Petkov , Zi Yan , Axel Rasmussen , David Hildenbrand , Will Deacon , Kefeng Wang , Alex Williamson Subject: Re: [PATCH v2 07/19] mm/fork: Accept huge pfnmap entries Message-Id: <20240909161539.aa685e3eb44cdc786b8c05d2@linux-foundation.org> In-Reply-To: References: <20240826204353.2228736-1-peterx@redhat.com> <20240826204353.2228736-8-peterx@redhat.com> <20240909152546.4ef47308e560ce120156bc35@linux-foundation.org> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 297AF18000E X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: ctisxa54ae3uujutjtnwo455a8umib9c X-HE-Tag: 1725923742-470345 X-HE-Meta: U2FsdGVkX1/bwXte7yVVGYKT/+ewCcn8WbWr6LTLh/M5WnuF9TFzsJc3ZR2GRxU0p7dGPB8wk62y6HLkVHajNw4/peWdIllv5g8zqApqZxRmPx1ZfS8ZWvndHMSWlu6rORD4q28AgrSta8Kw6R9ikJJTYx0pDjDbpwmfVpHJh3c365xOAo8OSPUFSR4Rf2Pz5Bgly6jTNhH7QMo+93CAVlLIp6Fx1KP64IFbhR4lnAtH+4ti5SMPG3bZ4iotiNmRGzpdoll1Js25VpT3kogU8FHj5ZnyPmk8PvXelJb0SPV2ZXrNF9PRSIhAgaiI54R4ILoXIo0D9HlS6Pz4e0lYulUG2bESDiTU6W8newyUacs+Ty9+Uxhq/Esxiv5PcFNH8oLShauHYY/1UTU6Cu92p8W84FF2WRz9ARZ7YRILOPmr/qceDWBBZ8X8XvkCfJJXJs77pELajjQhXiQAwr1Vjfv0lKhRxAEa4fBCqQUqyUrNLXd8t0PrU/VidXX94lsEf72WI1I6bRRdeiJy0NS9YdC6MNhEhiZWsn/IZuQsy+8cJpczyAvJfZhEroJbJ7Kjp8joHGXmTzF60v+52GeJWrK9rA187dzalaQ2TkPFcepqAEmdBaz2jvQJ1n1vAXvjq1Kh4DVjreaaTW835fc8V5u5cHsgj2ZJmFDHM8Iqm8hQyayOJtedVubTIJfbDFpNiuNEIX93fxnMFPSlfV6MQYOB3QN74QA0H40OFWSsPX/gO2WUwb6Nou94pPbzFp4kljn/oqmOsLqsAOiCK514k7oyrqkzOpWR2GJwfOTjfd9pksj8TC65G+c3nPe/Lwe2rEjnxBrRASRlSNj46C81ppkS68WXAiQFvcuO89W196b6/IBI5DTKgWNzxpnuq3EFt3L/IiljgHUskdjvS0U29GdNIvHraVObBo0lYlLoeb6T2yY66+8Jvp72kQGon4gmS1iCqSrm9wTDn4/PPJn pns03iW2 XlRfIzj1wbZhW1DDvcK77fnviJ5zgYg4WLJ0q9VJrXHOg8jpYa4/qMNNgz2eXvAbkJp4ndj1H5VIayCLJUtTE1QD8atDYXIfQckeZIQPCgdP81VMRet/AtqADKx7K2jW2tVHt3TnuPa2nzyEvwIwRB4RYLe3wR7tZSA2LIvqipkxk73QSXNB1Mpu1vnzXpUH68Otp1k4yl4FE9B5GY64GoYPUOiHxMHrDdBxzGrdWwsebHNyAq6kz8xu561A03AUGKkyw 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 Mon, 9 Sep 2024 18:43:22 -0400 Peter Xu wrote: > > > > Do we need the logic to clear dirty bit in the child as that in > > > > __copy_present_ptes()? (and also for the pmd's case). > > > > > > > > e.g. > > > > if (vma->vm_flags & VM_SHARED) > > > > pud = pud_mkclean(pud); > > > > > > Yeah, good question. I remember I thought about that when initially > > > working on these lines, but I forgot the details, or maybe I simply tried > > > to stick with the current code base, as the dirty bit used to be kept even > > > in the child here. > > > > > > I'd expect there's only performance differences, but still sounds like I'd > > > better leave that to whoever knows the best on the implications, then draft > > > it as a separate patch but only when needed. > > > > Sorry, but this vaguensss simply leaves me with nowhere to go. > > > > I'll drop the series - let's revisit after -rc1 please. > > Andrew, would you please explain why it needs to be dropped? > > I meant in the reply that I think we should leave that as is, and I think > so far nobody in real life should care much on this bit, so I think it's > fine to leave the dirty bit as-is. > > I still think whoever has a better use of the dirty bit and would like to > change the behavior should find the use case and work on top, but only if > necessary. Well. "I'd expect there's only performance differences" means to me "there might be correctness issues, I don't know". Is it or is it not merely a performance thing?