From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2AD4415E1FE for ; Thu, 11 Apr 2024 16:55:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712854562; cv=none; b=P6uTNsh59xnMESbqXUJzdfd4kl2EF5CcoqQveT9nACKkxbYfPVUDk4v1xoIzoC851Tv2+WJ1P662I6pEfmS5BTq7KcW4KXEq2AVGhjxoVDx1oFJaS8/bdiAp93V+i4K+dVG7bZCMXvCCs4pxiEQqfSllfYy33GGUP0PFtSoam40= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712854562; c=relaxed/simple; bh=mdyviDc2SZiHERUxq8FwGAUG2lksvejg1L3R6/TQq04=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=RtDtQCcW8mL9j7E12zPORBPTtFDS8G+kizLtnm9ta1vfDouucSoXyUYI/p4+LoNxwgxpF2z/PVAEM1iEUTJTF578e+nR5OpQ6JUu3f/1tBQc1g1AjQ/Gd4lbHgWiL9IPi4nKBNuTscEDtUskLSFOmXMeE8jmNCIKT8o94tvNebk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=CEmduPtL; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="CEmduPtL" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712854559; 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=zMWXkXzR0H7lOgn05ANda8bjR25lnib+pFQqcdAFtGw=; b=CEmduPtL3NP5XNR+oFsDnVOJaZoVwlx7dy2SpDMkrYd+ByLjBPDNySLL9ouFDlwrBxagu3 BJkyt5CIUk3SQVwtjYimIGEWuF/N7Omn/wmbfHopdQCiAeWPKGQeIWT7U9sxB+ZjvYoz0W M/50ajYZgsI8RUEvSFEfgE31ub9wAJI= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-192-ckWXbnXiNB2duHBvu9fiVA-1; Thu, 11 Apr 2024 12:55:57 -0400 X-MC-Unique: ckWXbnXiNB2duHBvu9fiVA-1 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-346b8ef7e10so507352f8f.3 for ; Thu, 11 Apr 2024 09:55:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712854556; x=1713459356; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zMWXkXzR0H7lOgn05ANda8bjR25lnib+pFQqcdAFtGw=; b=Vnu3eRs5MDRB07nZNORrinToniV87ufMuTmxt5Njj7PSjGDmHZ14G9bNlVNzaPwVwM jLE1ZUyrexlSG7AOmvvgxHmWpszf9SxeUpc233a8XtBuDUIWgZJ4LtqqsD6NN8aGO3pU NL5etE01Qp/vKjjEmAHrztue8US8AS8Y8/HX2exDjTb+aq11aynimUQa1KMZ0RLo+Isi ihvynJ2qOw1OcJeDVbNZdJwI5RoNtya14PLfmvsoqAM23gqknkLB0qVaeoXUbxPQGSdW VpSnta3HjHW8+6eA1PdLQcxZmEZg+Js4Szdo3PsxCrgFo+g/Y4Ep4jS37/LtFAIOosI0 DKzA== X-Forwarded-Encrypted: i=1; AJvYcCVS2PE2gaGa3sEoOYKfnGxPTKqTAdxqGA2idngp4tUUcD+q2G7tfMpLuechcj7Hc9qQ8YNdbdTbWxTwXUi7Vxoqh8lk7HUbwktlFbD0X2xBow== X-Gm-Message-State: AOJu0Yx0WviMbNyKC+OIffBi3NMwb/KOMg2pOacNwkMXziKxyAnZexRM frm3iFb3EaWCH+i0HPc1Ubi/Ky6ZdCLOmslRbWmCrhHj9QbF4NBMVfqUExUQnYwn6HWT65AF9aB vYCqgqX9Xk3tFkDDjGxjJano+4Xfbi/gqj6Glkk5Y3iE1O0VYcoPeTJiMEAY10+OBuMMQJC15uH D4utcOaWXM/NKQDENJCWfKHdV6MAJ8J/sjt4IkZ4Qu/w== X-Received: by 2002:a5d:5143:0:b0:346:67fd:beeb with SMTP id u3-20020a5d5143000000b0034667fdbeebmr125066wrt.13.1712854556789; Thu, 11 Apr 2024 09:55:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGD8Twrk+pSap7dr/hOyNv9dE7sPb5xWfugil3Ej7FN6UJvArBpNQmyBrQbHxp3h5Btn4P+dbeRSa2EBSrKO98= X-Received: by 2002:a5d:5143:0:b0:346:67fd:beeb with SMTP id u3-20020a5d5143000000b0034667fdbeebmr125049wrt.13.1712854556481; Thu, 11 Apr 2024 09:55:56 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-perf-users@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240405115815.3226315-1-pbonzini@redhat.com> <20240405115815.3226315-2-pbonzini@redhat.com> In-Reply-To: From: Paolo Bonzini Date: Thu, 11 Apr 2024 18:55:44 +0200 Message-ID: Subject: Re: [PATCH 1/4] KVM: delete .change_pte MMU notifier callback To: Peter Xu Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Marc Zyngier , Oliver Upton , Tianrui Zhao , Bibo Mao , Thomas Bogendoerfer , Nicholas Piggin , Anup Patel , Atish Patra , Sean Christopherson , Andrew Morton , David Hildenbrand , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm-riscv@lists.infradead.org, linux-mm@kvack.org, linux-trace-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Andrea Arcangeli Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Apr 8, 2024 at 3:56=E2=80=AFPM Peter Xu wrote: > Paolo, > > I may miss a bunch of details here (as I still remember some change_pte > patches previously on the list..), however not sure whether we considered > enable it? Asked because I remember Andrea used to have a custom tree > maintaining that part: > > https://github.com/aagit/aa/commit/c761078df7a77d13ddfaeebe56a0f4bc128b19= 68 The patch enables it only for KSM, so it would still require a bunch of cleanups, for example I also would still use set_pte_at() in all the places that are not KSM. This would at least fix the issue with the poor documentation of where to use set_pte_at_notify() vs set_pte_at(). With regard to the implementation, I like the idea of disabling the invalidation on the MMU notifier side, but I would rather have MMU_NOTIFIER_CHANGE_PTE as a separate field in the range instead of overloading the event field. > Maybe it can't be enabled for some reason that I overlooked in the curren= t > tree, or we just decided to not to? I have just learnt about the patch, nobody had ever mentioned it even though it's almost 2 years old... It's a lot of code though and no one has ever reported an issue for over 10 years, so I think it's easiest to just rip the code out. Paolo > Thanks, > > -- > Peter Xu >