Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp4080444ybx; Mon, 4 Nov 2019 07:33:16 -0800 (PST) X-Google-Smtp-Source: APXvYqxtHOKrJOV2jkxX5HAgs4Jx2QdDRuNxMzbW0i62vM03m/zhHwB0iIKKU452iq6QTUhchTJf X-Received: by 2002:a17:906:2e5a:: with SMTP id r26mr5076557eji.283.1572881596111; Mon, 04 Nov 2019 07:33:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572881596; cv=none; d=google.com; s=arc-20160816; b=VwIvmOM9moSEAr4kYu603Sgs/OneQkic+lWwC/uYg57uhWsT4ttXxlksbaMYDSVrdu zNWDmHPfqJPGUVVrL+WhHsd2ZOStORZK48bPtjdg+Y+qv4neRcsle1BeeKEVjvh+doSD k4hxLfcgimqEo1ovDGpgfpXRZxykZmvCEnHgRP0r9RnZ4fQG9eYXGoiQpg5hnVe0jk1S cw1XuS677BxaUuZnzO/1lc2aE89b3IZ3IMwrk9G1RMXkrzlaAbEqELul5q9VaxkLNQEX szzgWZk9rP1MFRFvEhhUdNYhJ48OjEOW59cJZs6GvaRz0d6A5iDq0puaUboRPqDSWzJx rOwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:user-agent:in-reply-to:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Mbwo60yuhf9zn/no1y4eRlxn1KfPxIVdxOh+1RcQBXI=; b=UmVFjoGbEEZLV2FwH54QbCjCCxsJzhCFhxjcc8ZnPYoj7LkCClAs9gkQw33V43jlMl SNHvQZlaSNUgglDI75NwIPE42pUnj+16YMVEjZJyMABjcm0W4Y9Le5s2EleAuxM6OCu9 lcfsWLtSm71iAH4L/fXHbFG4BdcNv2JdFktaaioLVr3z87SSzfWTQAiE5cJhluG3mrFL mwtP+JiAqZyG9FNffWoagz++JiJoI2QWDu1OmGkGsaMrg555O1GAjFiCWVUZATVjRmVB yYoAGnzrl8sTClDyh1Y1SgS8ibnRt48fFTQ1YJ3pRkwTJlyNAF4lUgxaUVc9EXJrv53Q hxig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="imFyFb/C"; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g20si7723969eda.229.2019.11.04.07.32.52; Mon, 04 Nov 2019 07:33:16 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b="imFyFb/C"; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729253AbfKDPa4 (ORCPT + 99 others); Mon, 4 Nov 2019 10:30:56 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:29890 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727838AbfKDPa4 (ORCPT ); Mon, 4 Nov 2019 10:30:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572881455; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Mbwo60yuhf9zn/no1y4eRlxn1KfPxIVdxOh+1RcQBXI=; b=imFyFb/Cn7rrHUwy/7VxmDqLZYXoXd4e0FA4Jl4SbniSU+lMWC0HEbr4iHadSOp9EDqJcu PxBamGTAUOZcu1sjYwxmTumERModM3HAIcn6PQU/CzedY89jKfC96CmSl6PJvA1KeT+002 ncTrMRK5l2rjMNfk5hbf5a1hrSTUEj4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-293-V26_gtMDPGyIgQsEcz9NSg-1; Mon, 04 Nov 2019 10:30:53 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4D800107ACC2; Mon, 4 Nov 2019 15:30:52 +0000 (UTC) Received: from bfoster (dhcp-41-2.bos.redhat.com [10.18.41.2]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B00265D6C5; Mon, 4 Nov 2019 15:30:51 +0000 (UTC) Date: Mon, 4 Nov 2019 10:30:49 -0500 From: Brian Foster To: Dave Chinner Cc: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 13/28] shrinker: clean up variable types and tracepoints Message-ID: <20191104153049.GD10665@bfoster> References: <20191031234618.15403-1-david@fromorbit.com> <20191031234618.15403-14-david@fromorbit.com> MIME-Version: 1.0 In-Reply-To: <20191031234618.15403-14-david@fromorbit.com> User-Agent: Mutt/1.12.1 (2019-06-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: V26_gtMDPGyIgQsEcz9NSg-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 01, 2019 at 10:46:03AM +1100, Dave Chinner wrote: > From: Dave Chinner >=20 > The tracepoint information in the shrinker code don't make a lot of Nit:=09=09=09=09=09=09 doesn't > sense anymore and contain redundant information as a result of the > changes in the patchset. Refine the information passed to the > tracepoints so they expose the operation of the shrinkers more > precisely and clean up the remaining code and varibles in the Nit:=09=09=09=09=09=09variables > shrinker code so it all makes sense. >=20 > Signed-off-by: Dave Chinner > --- > include/trace/events/vmscan.h | 69 ++++++++++++++++------------------- > mm/vmscan.c | 24 +++++------- > 2 files changed, 41 insertions(+), 52 deletions(-) >=20 ... > diff --git a/mm/vmscan.c b/mm/vmscan.c > index c0e2bf656e3f..7a8256322150 100644 > --- a/mm/vmscan.c > +++ b/mm/vmscan.c ... > @@ -624,23 +622,21 @@ static unsigned long do_shrink_slab(struct shrink_c= ontrol *shrinkctl, > =09=09cond_resched(); > =09} > done: ... > =09if (next_deferred > 0) > -=09=09new_nr =3D atomic64_add_return(next_deferred, > -=09=09=09=09=09=09&shrinker->nr_deferred[nid]); > -=09else > -=09=09new_nr =3D atomic64_read(&shrinker->nr_deferred[nid]); > +=09=09atomic64_add(next_deferred, &shrinker->nr_deferred[nid]); > =20 > -=09trace_mm_shrink_slab_end(shrinker, nid, freed, deferred_count, new_nr= , > -=09=09=09=09=09scan_count); > +=09trace_mm_shrink_slab_end(shrinker, nid, freed, scanned_objects, > +=09=09=09=09 next_deferred); I guess this invalidates my comment on the previous patch around new_nr. Looks Ok to me: Reviewed-by: Brian Foster > =09return freed; > } > =20 > --=20 > 2.24.0.rc0 >=20