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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211103094232.32a14cf0@gandalf.local.home>
Date:   Wed, 3 Nov 2021 09:42:32 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Baolin Wang <baolin.wang@...ux.alibaba.com>
Cc:     akpm@...ux-foundation.org, mingo@...hat.com, ziy@...dia.com,
        shy828301@...il.com, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 3/3] mm: compaction: Fix the migration stats in
 trace_mm_compaction_migratepages()

On Wed,  3 Nov 2021 18:51:16 +0800
Baolin Wang <baolin.wang@...ux.alibaba.com> wrote:

> @@ -2398,10 +2399,10 @@ bool compaction_zonelist_suitable(struct alloc_context *ac, int order,
>  
>  		err = migrate_pages(&cc->migratepages, compaction_alloc,
>  				compaction_free, (unsigned long)cc, cc->mode,
> -				MR_COMPACTION, NULL);
> +				MR_COMPACTION, &nr_succeeded);
>  
> -		trace_mm_compaction_migratepages(cc->nr_migratepages, err,
> -							&cc->migratepages);
> +		trace_mm_compaction_migratepages(cc->nr_migratepages,
> +						 nr_succeeded);

Also, I'm surprised you don't just pass in 'cc' and do the dereferencing in
the trace event macro. Accessing the pointers from the trace event and not
dereferencing them to the tracepoint function moves the changes out of line
here and helps with I$.

You could improve some of the other tracepoints that dereference 'cc' as
well in that file.

But as for this change, I'm good with it.

For the tracing aspect:

Reviewed-by: Steven Rostedt (VMware) <rostedt@...dmis.org>

-- Steve


>  
>  		/* All pages were either migrated or will be released */
>  		cc->nr_migratepages = 0;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ