Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1618521rdb; Mon, 2 Oct 2023 15:50:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFr54uLNLDuAE2DKkzKTV3PSvhE6kxjEPjmwsDRnbhgwq9PBLzxynqNEOCw0xfZnB4tUWM2 X-Received: by 2002:a05:6808:1382:b0:3a7:39f6:3f2c with SMTP id c2-20020a056808138200b003a739f63f2cmr17195293oiw.55.1696287039721; Mon, 02 Oct 2023 15:50:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696287039; cv=none; d=google.com; s=arc-20160816; b=ZyZGYHXf8qSl6+86aNTI9lpvUZvYMebw2sUwCHFcZquT+RoYnhmEXY2EeZTV8NPWbb fMY3cY4i9x2SmpNuejYHvZblDsXe+ySFa+E1SYk83WST7xnyCKGcWj14PCLSmjItNrez +VFOz80tzBrYHuguFfVKTBjoDrMyH8uu3EjERmAKbY4pMcP2fnHTY4dbOs3HmylSrgA7 aes1gb0z6sDp7LFN2O/szzS/H6eucm3NRt85whdPq8WMdtH4T2zT4xwqpD4e+zFbttNj NACUcBWlfO9ZbrZSFMt2HAe/a8L1yVZz5orcL56VY0iW4y61vdrxsZRFRrPaEKdMHPBJ cjpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=NJ3mkZai2rRb7fHwiHbH42pQCrq+/XPwIYX9xlpeNjA=; fh=DjsFyZDRjq03YRAcG2pNx0KyIsKbGS/0jB0DbjwP+yA=; b=B+MYd5JlN66RUadXXQ32bfObfKL9kYrFPo/kiUTUkptg+QD8hS3aNeCu3obcNcYkex kSZNtVa0NYdzHBmPkbZAyx8a9D4hGWBd8Rm7vE+tSaiiSFBBIrP+wpvj2db16xR5lkM7 XSEhXZpl2JXbkUJG7gnlQNOAMB/4BrtARsv5e/XafgFozH+giu/sMosefEAQXKRP98CZ 0cOpRI8vFVAIPyUYWYrF+SuXBBV5ywds0mWEUNeZHViS8j0b7zlmpZnKdc7FwDF6wAGf 6t/GJlDsuV5lVqXMjwpaCqgisAWnTOXJSKk2CvoLN/YcVmcNa3WpeMeblIHI7GUKFf1h 6GTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=TwmFmK+c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id x191-20020a6386c8000000b00565e5651c6dsi8969185pgd.766.2023.10.02.15.50.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 15:50:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=TwmFmK+c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 1142E806AA09; Mon, 2 Oct 2023 13:53:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229840AbjJBUxJ (ORCPT + 99 others); Mon, 2 Oct 2023 16:53:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229671AbjJBUxH (ORCPT ); Mon, 2 Oct 2023 16:53:07 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2F07CC; Mon, 2 Oct 2023 13:53:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=NJ3mkZai2rRb7fHwiHbH42pQCrq+/XPwIYX9xlpeNjA=; b=TwmFmK+cbs5K6/l/UHgdF7kfWz Q35hPPXix6s7N45u2WlTUkS4H8EG03QSJVLL91iPFWFU7NIkcLbWj1Vr+MMfiNnj983knf2LSCVxz m46udwv48pFhoUSncX70ZlQGNdZ561hTCKzHDIqCYntbjZSbdTBCR+NamMYT43hC0nXOi3IE7m+y7 +ggzmi7+LtD8E5VTp1Rdz/J1W9Rll6tZqQodKIHUxbegBFmMmGBWAOfunyt5qGqdH941GbFWR7xZ5 FKValdgHOo5zwPp7gMAoVyg47366brN0SUMSMYJjm4Q/dQeh55uurMQCuf5eFLQnnNbUtv17cR/Og Dg2Ad+FA==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1qnPuF-00B7zd-1t; Mon, 02 Oct 2023 20:52:43 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id B08AC300454; Mon, 2 Oct 2023 22:52:42 +0200 (CEST) Date: Mon, 2 Oct 2023 22:52:42 +0200 From: Peter Zijlstra To: "Liang, Kan" Cc: Sean Christopherson , Ingo Molnar , Dapeng Mi , Paolo Bonzini , Arnaldo Carvalho de Melo , Like Xu , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , kvm@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Zhenyu Wang , Zhang Xiong , Lv Zhiyuan , Yang Weijiang , Dapeng Mi , Jim Mattson , David Dunn , Mingwei Zhang , Thomas Gleixner Subject: Re: [Patch v4 07/13] perf/x86: Add constraint for guest perf metrics event Message-ID: <20231002205242.GC27267@noisy.programming.kicks-ass.net> References: <20230927033124.1226509-1-dapeng1.mi@linux.intel.com> <20230927033124.1226509-8-dapeng1.mi@linux.intel.com> <20230927113312.GD21810@noisy.programming.kicks-ass.net> <20230929115344.GE6282@noisy.programming.kicks-ass.net> <20231002115718.GB13957@noisy.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 02 Oct 2023 13:53:31 -0700 (PDT) On Mon, Oct 02, 2023 at 03:50:24PM -0400, Liang, Kan wrote: > Now, the NMI watchdog is using a "CPU-pinned" event. But I think it can > be replaced by the buddy system, commit 1f423c905a6b > ("watchdog/hardlockup: detect hard lockups using secondary (buddy) CPUs") For some simple cases. I've had plenty experience with situations where that thing would be completely useless. That is, at some point the 'all CPUs hard locked up' scenario was something I ran into a lot (although I can't for the life of me remember wtf I was doing at the time). All that needs is a single spin_lock_irqsave() on a common lock (or group of locks, like the rq->lock). Before you know it, the whole machine is a brick. That said; if you augment this thing with a bunch of CPUs that have HPET-NMI and IPI-NMI for backtraces, it might actually be useful.