From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753034AbcBCJ3m (ORCPT ); Wed, 3 Feb 2016 04:29:42 -0500 Received: from mx2.parallels.com ([199.115.105.18]:47850 "EHLO mx2.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751664AbcBCJ3h (ORCPT ); Wed, 3 Feb 2016 04:29:37 -0500 Date: Wed, 3 Feb 2016 12:29:26 +0300 From: Vladimir Davydov To: Johannes Weiner CC: Andrew Morton , Michal Hocko , , , , Subject: Re: [PATCH 3/3] mm: remove unnecessary uses of lock_page_memcg() Message-ID: <20160203092926.GG21016@esperanza> References: <1454109573-29235-1-git-send-email-hannes@cmpxchg.org> <1454109573-29235-4-git-send-email-hannes@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1454109573-29235-4-git-send-email-hannes@cmpxchg.org> X-ClientProxiedBy: US-EXCH2.sw.swsoft.com (10.255.249.46) To US-EXCH.sw.swsoft.com (10.255.249.47) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 29, 2016 at 06:19:33PM -0500, Johannes Weiner wrote: > There are several users that nest lock_page_memcg() inside lock_page() > to prevent page->mem_cgroup from changing. But the page lock prevents > pages from moving between cgroups, so that is unnecessary overhead. > > Remove lock_page_memcg() in contexts with locked contexts and fix the > debug code in the page stat functions to be okay with the page lock. > > Signed-off-by: Johannes Weiner Acked-by: Vladimir Davydov