From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752139AbdARKEN (ORCPT ); Wed, 18 Jan 2017 05:04:13 -0500 Received: from mx2.suse.de ([195.135.220.15]:40406 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751758AbdARKDw (ORCPT ); Wed, 18 Jan 2017 05:03:52 -0500 Subject: Re: [RFC 3/4] mm, page_alloc: move cpuset seqcount checking to slowpath To: Michal Hocko References: <20170117221610.22505-1-vbabka@suse.cz> <20170117221610.22505-4-vbabka@suse.cz> <20170118094054.GJ7015@dhcp22.suse.cz> Cc: Mel Gorman , Ganapatrao Kulkarni , linux-kernel@vger.kernel.org, linux-mm@kvack.org From: Vlastimil Babka Message-ID: <7b984dde-78c5-2efc-daef-bcdcc51fc9cb@suse.cz> Date: Wed, 18 Jan 2017 10:48:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <20170118094054.GJ7015@dhcp22.suse.cz> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/18/2017 10:40 AM, Michal Hocko wrote: > On Tue 17-01-17 23:16:09, Vlastimil Babka wrote: >> This is a preparation for the following patch to make review simpler. While >> the primary motivation is a bug fix, this could also save some cycles in the >> fast path. > > I cannot say I would be happy about this patch :/ The code is still very > confusing and subtle. I really think we should get rid of > synchronization with the concurrent cpuset/mempolicy updates instead. > Have you considered that instead? Not so thoroughly yet, but I already suspect it would be intrusive for stable. We could make copies of nodemask and mems_allowed and protect just the copying with seqcount, but that would mean overhead and stack space. Also we might try revert 682a3385e773 ("mm, page_alloc: inline the fast path of the zonelist iterator") ...