From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753273AbaJ0PSM (ORCPT ); Mon, 27 Oct 2014 11:18:12 -0400 Received: from mail-qc0-f176.google.com ([209.85.216.176]:63276 "EHLO mail-qc0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752990AbaJ0PSJ (ORCPT ); Mon, 27 Oct 2014 11:18:09 -0400 Date: Mon, 27 Oct 2014 11:18:06 -0400 From: Tejun Heo To: Vladimir Davydov Cc: Andrew Morton , David Rientjes , Christoph Lameter , Zefan Li , Pekka Enberg , Joonsoo Kim , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH RESEND 2/4] cpuset: simplify cpuset_node_allowed API Message-ID: <20141027151806.GR4436@htj.dyndns.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 20, 2014 at 03:50:30PM +0400, Vladimir Davydov wrote: > Current cpuset API for checking if a zone/node is allowed to allocate > from looks rather awkward. We have hardwall and softwall versions of > cpuset_node_allowed with the softwall version doing literally the same > as the hardwall version if __GFP_HARDWALL is passed to it in gfp flags. > If it isn't, the softwall version may check the given node against the > enclosing hardwall cpuset, which it needs to take the callback lock to > do. > > Such a distinction was introduced by commit 02a0e53d8227 ("cpuset: > rework cpuset_zone_allowed api"). Before, we had the only version with > the __GFP_HARDWALL flag determining its behavior. The purpose of the > commit was to avoid sleep-in-atomic bugs when someone would mistakenly > call the function without the __GFP_HARDWALL flag for an atomic > allocation. The suffixes introduced were intended to make the callers > think before using the function. > > However, since the callback lock was converted from mutex to spinlock by > the previous patch, the softwall check function cannot sleep, and these > precautions are no longer necessary. > > So let's simplify the API back to the single check. > > Suggested-by: David Rientjes > Signed-off-by: Vladimir Davydov > Acked-by: Christoph Lameter > Acked-by: Zefan Li Applied 1-2 to cgroup/for-3.19-cpuset-api-simplification which contains only these two patches on top of v3.18-rc2 and will stay stable. sl[au]b trees can pull it in or I can take the other two patches too. Please let me know how the other two should be routed. Thanks. -- tejun