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] [day] [month] [year] [list]
Message-ID: <56499D67.6050102@suse.cz>
Date:	Mon, 16 Nov 2015 10:09:59 +0100
From:	Vlastimil Babka <vbabka@...e.cz>
To:	yalin wang <yalin.wang2010@...il.com>, rostedt@...dmis.org,
	mingo@...hat.com, acme@...hat.com, namhyung@...nel.org,
	akpm@...ux-foundation.org, mhocko@...e.cz, vdavydov@...allels.com,
	hannes@...xchg.org, mgorman@...hsingularity.net, tj@...nel.org,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH V2] mm: change mm_vmscan_lru_shrink_inactive() proto types

On 11/16/2015 03:37 AM, yalin wang wrote:
> Move node_id zone_idx shrink flags into trace function,
> so thay we don't need caculate these args if the trace is disabled,
> and will make this function have less arguments.
>
> Signed-off-by: yalin wang <yalin.wang2010@...il.com>

Acked-by: Vlastimil Babka <vbabka@...e.cz>

Note that you could have added it yourself, as I said it's fine with me 
after doing the zone_to_nid() change. Also you can keep acked-by and 
reviewed-by from V1 when posting a V2 with only such a small change. V2 
didn't change the tracepoint API further from V1, so I'm quite sure 
Steven wouldn't mind keeping his:

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

(although it's true that the call to keep/drop the tags is not always 
obvious)

Thanks.

> ---
>   include/trace/events/vmscan.h | 14 +++++++-------
>   mm/vmscan.c                   |  7 ++-----
>   2 files changed, 9 insertions(+), 12 deletions(-)
>
> diff --git a/include/trace/events/vmscan.h b/include/trace/events/vmscan.h
> index dae7836..31763dd 100644
> --- a/include/trace/events/vmscan.h
> +++ b/include/trace/events/vmscan.h
> @@ -352,11 +352,11 @@ TRACE_EVENT(mm_vmscan_writepage,
>
>   TRACE_EVENT(mm_vmscan_lru_shrink_inactive,
>
> -	TP_PROTO(int nid, int zid,
> -			unsigned long nr_scanned, unsigned long nr_reclaimed,
> -			int priority, int reclaim_flags),
> +	TP_PROTO(struct zone *zone,
> +		unsigned long nr_scanned, unsigned long nr_reclaimed,
> +		int priority, int file),
>
> -	TP_ARGS(nid, zid, nr_scanned, nr_reclaimed, priority, reclaim_flags),
> +	TP_ARGS(zone, nr_scanned, nr_reclaimed, priority, file),
>
>   	TP_STRUCT__entry(
>   		__field(int, nid)
> @@ -368,12 +368,12 @@ TRACE_EVENT(mm_vmscan_lru_shrink_inactive,
>   	),
>
>   	TP_fast_assign(
> -		__entry->nid = nid;
> -		__entry->zid = zid;
> +		__entry->nid = zone_to_nid(zone);
> +		__entry->zid = zone_idx(zone);
>   		__entry->nr_scanned = nr_scanned;
>   		__entry->nr_reclaimed = nr_reclaimed;
>   		__entry->priority = priority;
> -		__entry->reclaim_flags = reclaim_flags;
> +		__entry->reclaim_flags = trace_shrink_flags(file);
>   	),
>
>   	TP_printk("nid=%d zid=%d nr_scanned=%ld nr_reclaimed=%ld priority=%d flags=%s",
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index 69ca1f5..f8fc8c1 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -1691,11 +1691,8 @@ shrink_inactive_list(unsigned long nr_to_scan, struct lruvec *lruvec,
>   	    current_may_throttle())
>   		wait_iff_congested(zone, BLK_RW_ASYNC, HZ/10);
>
> -	trace_mm_vmscan_lru_shrink_inactive(zone->zone_pgdat->node_id,
> -		zone_idx(zone),
> -		nr_scanned, nr_reclaimed,
> -		sc->priority,
> -		trace_shrink_flags(file));
> +	trace_mm_vmscan_lru_shrink_inactive(zone, nr_scanned, nr_reclaimed,
> +			sc->priority, file);
>   	return nr_reclaimed;
>   }
>
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ