lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 28 Mar 2016 13:38:25 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Nadav Amit <namit@...are.com>
Cc:	linux-mm@...ck.org, tglx@...utronix.de, mingo@...hat.com,
	hpa@...or.com, x86@...nel.org, mgorman@...e.de,
	sasha.levin@...cle.com, riel@...hat.com,
	dave.hansen@...ux.intel.com, luto@...nel.org,
	kirill.shutemov@...ux.intel.com, mhocko@...e.com,
	jmarchan@...hat.com, hughd@...gle.com, vdavydov@...tuozzo.com,
	minchan@...nel.org, linux-kernel@...r.kernel.org,
	Mel Gorman <mgorman@...hsingularity.net>
Subject: Re: [PATCH v2 1/2] x86/mm: TLB_REMOTE_SEND_IPI should count pages

On Sat, 26 Mar 2016 01:25:04 -0700 Nadav Amit <namit@...are.com> wrote:

> TLB_REMOTE_SEND_IPI was recently introduced, but it counts bytes instead
> of pages. In addition, it does not report correctly the case in which
> flush_tlb_page flushes a page. Fix it to be consistent with other TLB
> counters.
> 
> Fixes: 4595f9620cda8a1e973588e743cf5f8436dd20c6

I think you mean 5b74283ab251b9 ("x86, mm: trace when an IPI is about
to be sent")?

> --- a/arch/x86/mm/tlb.c
> +++ b/arch/x86/mm/tlb.c
> @@ -106,8 +106,6 @@ static void flush_tlb_func(void *info)
>  
>  	if (f->flush_mm != this_cpu_read(cpu_tlbstate.active_mm))
>  		return;
> -	if (!f->flush_end)
> -		f->flush_end = f->flush_start + PAGE_SIZE;
>  
>  	count_vm_tlb_event(NR_TLB_REMOTE_FLUSH_RECEIVED);
>  	if (this_cpu_read(cpu_tlbstate.state) == TLBSTATE_OK) {
> @@ -135,12 +133,20 @@ void native_flush_tlb_others(const struct cpumask *cpumask,
>  				 unsigned long end)
>  {
>  	struct flush_tlb_info info;
> +
> +	if (end == 0)
> +		end = start + PAGE_SIZE;
>  	info.flush_mm = mm;
>  	info.flush_start = start;
>  	info.flush_end = end;
>  
>  	count_vm_tlb_event(NR_TLB_REMOTE_FLUSH);
> -	trace_tlb_flush(TLB_REMOTE_SEND_IPI, end - start);
> +	if (end == TLB_FLUSH_ALL)
> +		trace_tlb_flush(TLB_REMOTE_SEND_IPI, TLB_FLUSH_ALL);
> +	else
> +		trace_tlb_flush(TLB_REMOTE_SEND_IPI,
> +				(end - start) >> PAGE_SHIFT);
> +
>  	if (is_uv_system()) {
>  		unsigned int cpu;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ