From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754140AbcA2IiD (ORCPT ); Fri, 29 Jan 2016 03:38:03 -0500 Received: from mx2.parallels.com ([199.115.105.18]:45644 "EHLO mx2.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752813AbcA2IiA (ORCPT ); Fri, 29 Jan 2016 03:38:00 -0500 Date: Fri, 29 Jan 2016 11:37:49 +0300 From: Vladimir Davydov To: Vlastimil Babka CC: Michal Hocko , Andrew Morton , Johannes Weiner , , Subject: Re: [PATCH] vmpressure: Fix subtree pressure detection Message-ID: <20160129083749.GB4952@esperanza> References: <1453912137-25473-1-git-send-email-vdavydov@virtuozzo.com> <20160128155531.GE15948@dhcp22.suse.cz> <56AA6AEE.30004@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <56AA6AEE.30004@suse.cz> 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 Thu, Jan 28, 2016 at 08:24:30PM +0100, Vlastimil Babka wrote: > On 28.1.2016 16:55, Michal Hocko wrote: > > On Wed 27-01-16 19:28:57, Vladimir Davydov wrote: > >> When vmpressure is called for the entire subtree under pressure we > >> mistakenly use vmpressure->scanned instead of vmpressure->tree_scanned > >> when checking if vmpressure work is to be scheduled. This results in > >> suppressing all vmpressure events in the legacy cgroup hierarchy. Fix > >> it. > >> > >> Fixes: 8e8ae645249b ("mm: memcontrol: hook up vmpressure to socket pressure") > >> Signed-off-by: Vladimir Davydov > > > > a = b += c made me scratch my head for a second but this looks correct > > Ugh, it's actually a = b += a > > While clever and compact, this will make scratch their head anyone looking at > the code in the future. Is it worth it? I'm just trying to be consistend with the !tree case, where we do exactly the same. Thanks, Vladimir