From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751932AbdJTHM4 (ORCPT ); Fri, 20 Oct 2017 03:12:56 -0400 Received: from mx2.suse.de ([195.135.220.15]:43315 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751723AbdJTHMy (ORCPT ); Fri, 20 Oct 2017 03:12:54 -0400 Date: Fri, 20 Oct 2017 09:12:50 +0200 From: Michal Hocko To: Neha Agarwal Cc: "Kirill A. Shutemov" , Andrew Morton , Andrea Arcangeli , Johannes Weiner , Vladimir Davydov , Dan Williams , David Rientjes , Naoya Horiguchi , Mel Gorman , Vlastimil Babka , Kemi Wang , "Aneesh Kumar K.V" , Shaohua Li , linux-kernel@vger.kernel.org, linux-mm@kvack.org, cgroups@vger.kernel.org Subject: Re: [RFC PATCH] mm, thp: make deferred_split_shrinker memcg-aware Message-ID: <20171020071250.ftqn2d356yekkp5k@dhcp22.suse.cz> References: <20171019200323.42491-1-nehaagarwal@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171019200323.42491-1-nehaagarwal@google.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 19-10-17 13:03:23, Neha Agarwal wrote: > deferred_split_shrinker is NUMA aware. Making it memcg-aware if > CONFIG_MEMCG is enabled to prevent shrinking memory of memcg(s) that are > not under memory pressure. This change isolates memory pressure across > memcgs from deferred_split_shrinker perspective, by not prematurely > splitting huge pages for the memcg that is not under memory pressure. Why do we need this? THP pages are usually not shared between memcgs. Or do you have a real world example where this is not the case? Your patch is adding quite a lot of (and to be really honest very ugly) code so there better should be a _very_ good reason to justify it. I haven't looked very closely to the code, at least all those ifdefs in the code are too ugly to live. -- Michal Hocko SUSE Labs