Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4056545ybg; Fri, 25 Oct 2019 12:41:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqxfrEMABU7yghCXMQ1AePUqFDuILxnHVS7u4B/fWCBdGFoX8Fp7E84hA0+Uv7j/u06F9GPW X-Received: by 2002:a05:6402:8cf:: with SMTP id d15mr5690171edz.225.1572032469664; Fri, 25 Oct 2019 12:41:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572032469; cv=none; d=google.com; s=arc-20160816; b=xwnK5cq0oVf413qp9LL0mZdWY1SMLqtye2tn1Nn/TSSmnv8nqfevQhQVtUqMaLP9I7 f9dQLt0uc1Rnb/lvM+hIlknTlbahi0BNmylJveFQz8jBvuM8H2Cf6o1KkGE+Qh+vDjXf qVL/fwBv7Jp+gUrsC4U1iGxunTM6RegVHA68ix02+n+gxI7J1RewGRXKDZK9f6Otpw9H ao4D/AFsVwjocT6af/99RpkXlrsMl6K94UE9gk4FU/PL/RfNU6jL9TC1GvAqDzLWo3hO zPbbkhB78wGBhAHnMEGgWXPplrMlsunD3DqYttzSQOrw/WKsHke51IkzzCuI/5ktkq6V hx4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=vcv+sUjd4gCxhtBh/eIPCnNyAzYUAU04rrLt6HLs6rs=; b=AJ7V2cd7WA8I34BOWSyTn7rgxC73jYfRuaRC7Q+va7/Zus9s0nCAohKM92IqBaorAH BCTRaukmkNEn1qkWw6dMaob3kV3BGBYGHbtz0SkbJ9Gyg/N81rTPccrurjn0MS0cJ7u0 M4SCJxkK3Mmmthhjvh9PiIX2m5dk+H3CQl4c8tU/Iv1+COFJ7hvrBOEOz4eARHLdmRFb fHOYxvQya58bcklubSFOIxfSmo+R5UX6jxBUI7PrpnmpDjRgQUCXIJLIYoE1EJAKh+Mo gGVix5TqlGgHMLCX85sxheQT+vF1p94tLLjxtQf/7IfEjR4DE/idnbbhT3KwEeHtYrlZ eYJw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l19si1679177ejx.373.2019.10.25.12.40.46; Fri, 25 Oct 2019 12:41:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394324AbfJYKjj (ORCPT + 99 others); Fri, 25 Oct 2019 06:39:39 -0400 Received: from mx2.suse.de ([195.135.220.15]:51066 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730471AbfJYKjj (ORCPT ); Fri, 25 Oct 2019 06:39:39 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 0CB61AD9C; Fri, 25 Oct 2019 10:39:37 +0000 (UTC) From: Thomas Renninger To: " Natarajan, Janakarajan " Cc: "linux-kernel@vger.kernel.org" , "linux-pm@vger.kernel.org" , Pu Wen , Shuah Khan , Thomas Gleixner , Greg Kroah-Hartman , Kate Stewart , Allison Randal , Richard Fontana , Borislav Petkov Subject: Re: [PATCHv2 2/3] cpupower: mperf_monitor: Introduce per_cpu_schedule flag Date: Fri, 25 Oct 2019 12:39:36 +0200 Message-ID: <24194241.SRZ5kbjNg7@skinner.arch.suse.de> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Natarajan, sorry for answering that late. I post on top as it doesn't fit to the patch context: While I like the 2 other patches, especially the first preparing for a generic "ensure to always run on the measured CPU at measure time" interface..., this patch does make use of it in a very static manner. I then tried to get this more generic..., without any outcome for now. If someone likes to play with this, my idea would be: - the monitors need cpu_start() and cpu_stop() callbacks to register - either start(), stop() and/or cpu_start(), cpu_stop() callbacks have to be provided by a monitor. - current behavior is only start/stop which means the whole per_cpu logic resides inside the monitor - if cpu_start/cpu_stop is provided, iterating over all cpus is done in fork_it and general start/stop functions are an optionally entry point before and after the per_cpu calls. Then the cpu binding can be done from outside. Another enhancement could be then to fork as many processes as there are CPUs in case of per_cpu_schedule (or an extra param/flag) and then: - Bind these forked processes to each cpu. - Execute start measures via the forked processes on each cpu - Execute test executable (which runs in yet another fork as done already) - Execute stop measures via the forked processes on each cpu This should be ideal environment to not interfere with the tested executable. It would also allow a nicer program structure. Just some ideas. But no time right now to look deeper into this. I'll ack on the first summarizing commit message. Thomas