Received: by 10.223.164.202 with SMTP id h10csp671470wrb; Tue, 7 Nov 2017 12:30:07 -0800 (PST) X-Google-Smtp-Source: ABhQp+TXrik6Evw78pLjPIxP16CvO69HeWq9hvZs/vZBFKdDfpj2G8JhAv3Ft02YN39hhbnfBzKm X-Received: by 10.98.60.23 with SMTP id j23mr22028723pfa.190.1510086607256; Tue, 07 Nov 2017 12:30:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510086607; cv=none; d=google.com; s=arc-20160816; b=b9vSZNAwHbXQ7ORlG/Ze1QgUvT1d6WKA2q4DC5V5du7JEqpoBpbZyPzlT+XTem+Nlg jx3pgEgv3Y30GcPd6P6fXHjGwrl7GVJzv0uwt3XOmvp4Ddq4er8qVNCBItY2NH7/qjxC NJoRzhji9Na9IqY0e7IxrtZ5/yWxn5L/lGrjv/yUqbmi07Sz0GeUiB73rjQbTxWgM1oa hfGjFCJbftwvkM70sycJmp0vt+Q1oJA5iHBtEzTpA4vcDY28ncGSSWdDaubfUBIyU44U TxF/hRnajzvirUa2M6ylY0aw6TNsmp99a1xSQTUOsrSeZtOwz/FPVkCVMoYDcxw/Dpwn FsRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:arc-authentication-results; bh=vyvn90tVpgTFaHJgB4NOGWPnb52TOITuUJgWd4Vho2k=; b=IYvJjpeA/H6Fk3lJiZVKw3QKH7b09Qg/YZq9C3kQN/Gq+F8RcW63MlCwfvRO0CHwI+ JZi2+svZ9macRlBLZNUNGXGxyndx8aKuy6DJjqHM3LNDYDy3x2aRRtnslbGjoJ9EIiq6 SdxsUlHKfM1qBgcj+/W/SEQ5IPToyf+1Yf1E9CXHM0dbOUb1b4qbDYlY1CEcIJr+OFUN uzOtHjaYOvfts8e2efke1EWREgcXQOgceVjZQrZBt1oXSVSBhfxrFrA+8d3h/VVqiEuc Q3QkGRWd3o6Q9SOgnjMEiEe0MzvBQ4jPFS8FUWRqEStR8KTSE+WBqMczqYzTsjoQWQNP ohDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eWrTihQq; 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=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w10si1934866pgr.25.2017.11.07.12.29.33; Tue, 07 Nov 2017 12:30:07 -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=@gmail.com header.s=20161025 header.b=eWrTihQq; 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=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755240AbdKGJSw (ORCPT + 91 others); 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 Received: by mail-lf0-f68.google.com with SMTP id w21so13573165lfc.6; Tue, 07 Nov 2017 01:18:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=vyvn90tVpgTFaHJgB4NOGWPnb52TOITuUJgWd4Vho2k=; b=eWrTihQqka4A60tx5HfhQKAAb4n9gEetSAXKCPg9H6YLpNoMHbPiQszedNr5XgiySO wlHvp4nesELxzUl7Iz09Ghko4wSM4SGCm8QEoo9gR1GVvpCBIWirjlICmz/X/GXtHIsk g/9PpJMxOAzw6z8yYZkHMJEguKH/dQpPIZPx6T9O6VobUJkdvSPBNzRH8QNPbKdi33F4 T7yHUQpRxzMiIB1DFfq61P2sD/8NLJBnYnBrbB4jxcxnK2jf6SILISzp/qtJM2uR1cOM KgnnLE9rSSzW1NRAscUgQcdkso/S7iWzwtelff6HcHiotIA+how6MbgIWIs3oB6Ed+Yy QEzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=vyvn90tVpgTFaHJgB4NOGWPnb52TOITuUJgWd4Vho2k=; b=LY+JNs+TnP0BH/XAYhvvyEnhov0QbahzU+rzfZ1pafrVind8wVKlMAe3ZIwpA8mxXP Z6kNA3aYGkfjzOvTPzWXvj6U4TkUx7zNlD2ElR49YPYgOkCvw0jxenRq66EV6dh54rkX F08YiWv0CqEsYiOS3Iu3kfCvlQ4P+9/TSEypd1ycdGlmTJZfkoiybF8go9rPmXWBRieL 4I7pEJL1tirkFlBs0XSfpX3Ox929VdyMQkOoXn2+6uUkqPffHPaDSfAX7Amoj4J5hgj4 KSvm6VmpYze+lHKIhW/WonhhBZPf0wlJymSq4mJIWrbn17EfEY67Ba7TrcGNP6bNseJA PURw== X-Gm-Message-State: AJaThX7jOHnsLTWRFqMkatNvL7sGViepOns1EBUEklex3F79EiRv+iOa myOSRx9lubHPbTeH9/nXpYc= X-Received: by 10.25.56.27 with SMTP id f27mr6268290lfa.31.1510046327392; Tue, 07 Nov 2017 01:18:47 -0800 (PST) Received: from esperanza ([185.6.245.156]) by smtp.gmail.com with ESMTPSA id v29sm148005ljv.27.2017.11.07.01.18.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Nov 2017 01:18:46 -0800 (PST) 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 Precedence: bulk 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 From 1583059666199078608@xxx Fri Nov 03 15:35:44 +0000 2017 X-GM-THRID: 1583059666199078608 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread