All of lore.kernel.org
 help / color / mirror / Atom feed
From: Liang, Kan <kan.liang@linux.intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH V3 2/2] perf/x86: Reset the dirty counter to prevent the leak for an RDPMC task
Date: Wed, 14 Apr 2021 09:47:06 -0400	[thread overview]
Message-ID: <ff3622c3-3fdd-9e94-17ca-f0bf8dd98544@linux.intel.com> (raw)
In-Reply-To: <202104140454.EDz6DV9M-lkp@intel.com>

[-- Attachment #1: Type: text/plain, Size: 3023 bytes --]



On 4/13/2021 4:33 PM, kernel test robot wrote:
> Hi,
> 
> Thank you for the patch! Perhaps something to improve:
> 
> [auto build test WARNING on tip/perf/core]
> [also build test WARNING on tip/master linux/master linus/master v5.12-rc7 next-20210413]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch]
> 
> url:    https://github.com/0day-ci/linux/commits/kan-liang-linux-intel-com/perf-x86-Move-cpuc-running-into-P4-specific-code/20210414-030649
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git cface0326a6c2ae5c8f47bd466f07624b3e348a7
> config: i386-tinyconfig (attached as .config)
> compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
> reproduce (this is a W=1 build):
>          # https://github.com/0day-ci/linux/commit/83f02393e1b5a2723294d8697f4fd5473d70602c
>          git remote add linux-review https://github.com/0day-ci/linux
>          git fetch --no-tags linux-review kan-liang-linux-intel-com/perf-x86-Move-cpuc-running-into-P4-specific-code/20210414-030649
>          git checkout 83f02393e1b5a2723294d8697f4fd5473d70602c
>          # save the attached .config to linux build tree
>          make W=1 ARCH=i386
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All warnings (new ones prefixed by >>):
> 
>>> arch/x86/events/core.c:2309:6: warning: no previous prototype for 'x86_pmu_clear_dirty_counters' [-Wmissing-prototypes]
>      2309 | void x86_pmu_clear_dirty_counters(void)
>           |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> 
> vim +/x86_pmu_clear_dirty_counters +2309 arch/x86/events/core.c
> 
>    2308	
>> 2309	void x86_pmu_clear_dirty_counters(void)


Should be "static void x86_pmu_clear_dirty_counters(void)".

I will send V4 shortly to fix it.

Thanks,
Kan

>    2310	{
>    2311		struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
>    2312		int i;
>    2313	
>    2314		if (bitmap_empty(cpuc->dirty, X86_PMC_IDX_MAX))
>    2315			return;
>    2316	
>    2317		 /* Don't need to clear the assigned counter. */
>    2318		for (i = 0; i < cpuc->n_events; i++)
>    2319			__clear_bit(cpuc->assign[i], cpuc->dirty);
>    2320	
>    2321		for_each_set_bit(i, cpuc->dirty, X86_PMC_IDX_MAX) {
>    2322			/* Metrics and fake events don't have corresponding HW counters. */
>    2323			if (is_metric_idx(i) || (i == INTEL_PMC_IDX_FIXED_VLBR))
>    2324				continue;
>    2325			else if (i >= INTEL_PMC_IDX_FIXED)
>    2326				wrmsrl(MSR_ARCH_PERFMON_FIXED_CTR0 + (i - INTEL_PMC_IDX_FIXED), 0);
>    2327			else
>    2328				wrmsrl(x86_pmu_event_addr(i), 0);
>    2329		}
>    2330	
>    2331		bitmap_zero(cpuc->dirty, X86_PMC_IDX_MAX);
>    2332	}
>    2333	
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
> 

WARNING: multiple messages have this Message-ID (diff)
From: "Liang, Kan" <kan.liang@linux.intel.com>
To: kernel test robot <lkp@intel.com>,
	peterz@infradead.org, mingo@kernel.org,
	linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org, acme@kernel.org, ak@linux.intel.com,
	mark.rutland@arm.com, luto@amacapital.net, eranian@google.com,
	namhyung@kernel.org
Subject: Re: [PATCH V3 2/2] perf/x86: Reset the dirty counter to prevent the leak for an RDPMC task
Date: Wed, 14 Apr 2021 09:47:06 -0400	[thread overview]
Message-ID: <ff3622c3-3fdd-9e94-17ca-f0bf8dd98544@linux.intel.com> (raw)
In-Reply-To: <202104140454.EDz6DV9M-lkp@intel.com>



On 4/13/2021 4:33 PM, kernel test robot wrote:
> Hi,
> 
> Thank you for the patch! Perhaps something to improve:
> 
> [auto build test WARNING on tip/perf/core]
> [also build test WARNING on tip/master linux/master linus/master v5.12-rc7 next-20210413]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch]
> 
> url:    https://github.com/0day-ci/linux/commits/kan-liang-linux-intel-com/perf-x86-Move-cpuc-running-into-P4-specific-code/20210414-030649
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git cface0326a6c2ae5c8f47bd466f07624b3e348a7
> config: i386-tinyconfig (attached as .config)
> compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
> reproduce (this is a W=1 build):
>          # https://github.com/0day-ci/linux/commit/83f02393e1b5a2723294d8697f4fd5473d70602c
>          git remote add linux-review https://github.com/0day-ci/linux
>          git fetch --no-tags linux-review kan-liang-linux-intel-com/perf-x86-Move-cpuc-running-into-P4-specific-code/20210414-030649
>          git checkout 83f02393e1b5a2723294d8697f4fd5473d70602c
>          # save the attached .config to linux build tree
>          make W=1 ARCH=i386
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All warnings (new ones prefixed by >>):
> 
>>> arch/x86/events/core.c:2309:6: warning: no previous prototype for 'x86_pmu_clear_dirty_counters' [-Wmissing-prototypes]
>      2309 | void x86_pmu_clear_dirty_counters(void)
>           |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> 
> vim +/x86_pmu_clear_dirty_counters +2309 arch/x86/events/core.c
> 
>    2308	
>> 2309	void x86_pmu_clear_dirty_counters(void)


Should be "static void x86_pmu_clear_dirty_counters(void)".

I will send V4 shortly to fix it.

Thanks,
Kan

>    2310	{
>    2311		struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
>    2312		int i;
>    2313	
>    2314		if (bitmap_empty(cpuc->dirty, X86_PMC_IDX_MAX))
>    2315			return;
>    2316	
>    2317		 /* Don't need to clear the assigned counter. */
>    2318		for (i = 0; i < cpuc->n_events; i++)
>    2319			__clear_bit(cpuc->assign[i], cpuc->dirty);
>    2320	
>    2321		for_each_set_bit(i, cpuc->dirty, X86_PMC_IDX_MAX) {
>    2322			/* Metrics and fake events don't have corresponding HW counters. */
>    2323			if (is_metric_idx(i) || (i == INTEL_PMC_IDX_FIXED_VLBR))
>    2324				continue;
>    2325			else if (i >= INTEL_PMC_IDX_FIXED)
>    2326				wrmsrl(MSR_ARCH_PERFMON_FIXED_CTR0 + (i - INTEL_PMC_IDX_FIXED), 0);
>    2327			else
>    2328				wrmsrl(x86_pmu_event_addr(i), 0);
>    2329		}
>    2330	
>    2331		bitmap_zero(cpuc->dirty, X86_PMC_IDX_MAX);
>    2332	}
>    2333	
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
> 

  reply	other threads:[~2021-04-14 13:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-13 18:57 [PATCH V3 1/2] perf/x86: Move cpuc->running into P4 specific code kan.liang
2021-04-13 18:57 ` [PATCH V3 2/2] perf/x86: Reset the dirty counter to prevent the leak for an RDPMC task kan.liang
2021-04-13 20:33   ` kernel test robot
2021-04-13 20:33     ` kernel test robot
2021-04-14 13:47     ` Liang, Kan [this message]
2021-04-14 13:47       ` Liang, Kan
2021-04-13 23:41   ` kernel test robot
2021-04-13 23:41     ` kernel test robot
2021-04-14  0:34   ` Andy Lutomirski
2021-04-14  1:30     ` Liang, Kan
2021-04-14 13:51   ` Namhyung Kim
2021-04-14 14:27     ` Liang, Kan
2021-04-14 12:22 ` [PATCH V3 1/2] perf/x86: Move cpuc->running into P4 specific code Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ff3622c3-3fdd-9e94-17ca-f0bf8dd98544@linux.intel.com \
    --to=kan.liang@linux.intel.com \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.