Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4122759ybg; Fri, 25 Oct 2019 13:41:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqxHteAZYjU4M1KUtGRxVPngf+p9RmAUGymzMBzpFQMTq2NqEnrjSRF/a8RtNe+sgQ6ulLJQ X-Received: by 2002:aa7:c752:: with SMTP id c18mr2991578eds.151.1572036087476; Fri, 25 Oct 2019 13:41:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572036087; cv=none; d=google.com; s=arc-20160816; b=yfTZtMQYTMUg1PJQuhzGBFe8Yr+U1N7vB/T5J6/XEfmDp2bwtxX3aEu3ZUKT0C065/ 5GkMYxySoCuVGYUg/TOVXsBS8xkXrAQVU+S5TgdQsIeudis0uJhoDic1v8IOLGLjABFg XfQZdpDxtO5eMXA7IUxDuw9fRs8TKsWr+XbPLH/iAiEBaQtaTUjOQ5eKkX+fagCg7HhR qQVdG3lVZlZEHnG/pa8F1Wn1ggRm2QTrizzSqYLFq/fZ5ZzAA8hXHHprJ9/KMOJSx/4q ldHj7FjuufjuCtgL3gKN1CjHjcBULdjBm0kJQf+z9SjO3Px6FPicPrn870haCMxGHm4o bCUA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=7wh9eNBbN7RpFmEuNMrYPnJn4UujHhhbcnkXBvUc/uA=; b=JEWXHZuggnkZhxqchaSZv7vr+Y72T6Pe4RwkIufDkTm2hWeB7QM4ddfOqkIGSempjV tuG0enlPfTYk4OQYIyliGbvCExHRCn53a/35bjYy9vtn/eNi05bUYqee55kYQTQhIxdQ bb/aXP3SxHNpqSb18r663vze0EC4ARgpXnBWfo5XnOXYrmaXU7N2Pk1qiCxt4H7JyCgx HP+sWsEBkzjWG0L4cn2S3EmWXy/+wrSP7i7+MnomHpbi0VWWetwhM145aDuNbNF+oGZc qgMIIcG+zz7+YMde3Ty+267pSvR0LvkZx3DrQI6klFTOSE3kY8hBA8Isi+DGgg2xF3lG YQbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WVxU7e9X; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m90si2357934ede.52.2019.10.25.13.41.03; Fri, 25 Oct 2019 13:41:27 -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; dkim=pass header.i=@kernel.org header.s=default header.b=WVxU7e9X; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2395437AbfJYPdm (ORCPT + 99 others); Fri, 25 Oct 2019 11:33:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:55052 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2395430AbfJYPdl (ORCPT ); Fri, 25 Oct 2019 11:33:41 -0400 Received: from [192.168.1.112] (c-24-9-64-241.hsd1.co.comcast.net [24.9.64.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3805021929; Fri, 25 Oct 2019 15:33:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572017620; bh=H7fURjLkyZ1XV2iHKmY6CUs6YlFPI+akWYnt8ibppik=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=WVxU7e9XByy6NZTJWF5jfJgaNH9FoceabuNtEJyuSCiXjzbzuKkg2Ytii1fLoU+gx xl7B5XtgkhBk1d2JtOTgucvx2vW6Pp3Ngs2UuGZFPSpz4JA/erwgPKkxroaa3dUvsq ce92QC4I3jypxCLySUq8RVX784/cGMNibrYvI8UY= Subject: Re: [PATCHv2 2/3] cpupower: mperf_monitor: Introduce per_cpu_schedule flag To: Thomas Renninger , "Natarajan, Janakarajan" Cc: "linux-kernel@vger.kernel.org" , "linux-pm@vger.kernel.org" , Pu Wen , Thomas Gleixner , Greg Kroah-Hartman , Kate Stewart , Allison Randal , Richard Fontana , Borislav Petkov , shuah References: <24194241.SRZ5kbjNg7@skinner.arch.suse.de> From: shuah Message-ID: Date: Fri, 25 Oct 2019 09:33:39 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <24194241.SRZ5kbjNg7@skinner.arch.suse.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/25/19 4:39 AM, Thomas Renninger wrote: > 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. > It will be good to capture these ideas in the ToDo file. Natarajan! WOuld you like to send a patch updating the ToDo file with these ideas? thanks, -- Shuah