From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755245AbdKGJSw (ORCPT ); Tue, 7 Nov 2017 04:18:52 -0500 Received: from mail-lf0-f68.google.com ([209.85.215.68]:49871 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752581AbdKGJSs (ORCPT ); Tue, 7 Nov 2017 04:18:48 -0500 X-Google-Smtp-Source: ABhQp+S0eYQXerXAit2XZyae3KMX5kT/G6MayaS7nkQ1Nitw6O1vCg6nrkWf/AgN7XldlaiKQ2rhcg== Date: Tue, 7 Nov 2017 12:18:44 +0300 From: Vladimir Davydov To: Johannes Weiner Cc: Andrew Morton , Michal Hocko , linux-mm@kvack.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH 2/3] mm: memcontrol: implement lruvec stat functions on top of each other Message-ID: <20171107091844.qiz5lvmdykbinwqx@esperanza> References: <20171103153336.24044-1-hannes@cmpxchg.org> <20171103153336.24044-2-hannes@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171103153336.24044-2-hannes@cmpxchg.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 03, 2017 at 11:33:35AM -0400, Johannes Weiner wrote: > The implementation of the lruvec stat functions and their variants for > accounting through a page, or accounting from a preemptible context, > are mostly identical and needlessly repetitive. > > Implement the lruvec_page functions by looking up the page's lruvec > and then using the lruvec function. > > Implement the functions for preemptible contexts by disabling > preemption before calling the atomic context functions. > > Signed-off-by: Johannes Weiner > --- > include/linux/memcontrol.h | 44 ++++++++++++++++++++++---------------------- > 1 file changed, 22 insertions(+), 22 deletions(-) Acked-by: Vladimir Davydov