Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp4993638imm; Tue, 26 Jun 2018 04:14:50 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL4npmq6yGCQ2xYvOy1ObkkUSMWE9+1g2dSOfIkwoO8hMwtTT5cblM1UyS3pH2xM1/2rrxX X-Received: by 2002:a63:69c4:: with SMTP id e187-v6mr975328pgc.294.1530011690029; Tue, 26 Jun 2018 04:14:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530011690; cv=none; d=google.com; s=arc-20160816; b=UqBFAqpLGd/Es8wO15gq+3Ji6e/PBih520KXAUGsPFf1mCLHsyFeBQVtIXMq6xdSsg PyXSGwL+Sw8eJx+DFxoooJdD5KXByZ3xqoqlGjpqCOoOziSnTyO5lSstmnaiyl6c6seC JrcLo2k3pZtUkkjOLtinLWvOvkdWAVXgZdzUmWll892YNRF5UxSHcwX0MyzjrKx9RCVs mxS+jnklb/S2DdfQpgiqvfZV+iWaZLOZP5A72WbVprcmt4groFoAIp8brPuYa1IwZ7MA e4hyqh5egaQHk0Vx7Is5O1RTIMx8SVC8paDeLhtVji1FUl/hd/yA2T9erno4op/wbNBP 5M5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:date:cc:to:from:subject :message-id:arc-authentication-results; bh=qnr+PxWV5lFCMHfXDYu4JAQjUyCUhgUKNX9PhBNLjoQ=; b=UFBU4Jt003RI625/4gHqtF7y+JlEbUZ+tfHEecjp2NxzhzhN/Zc2DK34ET/K3GCuw6 RXhcuyFDhxR1BFa6w48INd0vWCRYuT88zVzM9RKahbGY6ZpT75xiGQdfYApg9W/Bx3aU 8eWeU/9u7ciewFIz8ClMwaQyu2DVDnvwFi+CS1Krj60c8hAibjIAaXFecYa0AG3e5z2o t0n55HaYOrUmvEjuZMOhNHdvqoO7dr/U3BL8PAeqiOWaPvMExlRpNGIXgLbSpwHTMt67 LfpWIyq/5MU2OZvu/GcOig+ZtcSqHnPyb9bFpmCfCpo7rvHPtV+5BRWSAhSzElNfg7b8 r4RA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v10-v6si1244197pgo.643.2018.06.26.04.14.35; Tue, 26 Jun 2018 04:14:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934628AbeFZLNv (ORCPT + 99 others); Tue, 26 Jun 2018 07:13:51 -0400 Received: from mga12.intel.com ([192.55.52.136]:10184 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933592AbeFZLNs (ORCPT ); Tue, 26 Jun 2018 07:13:48 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jun 2018 04:13:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,274,1526367600"; d="scan'208";a="51982655" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.86]) by orsmga007.jf.intel.com with ESMTP; 26 Jun 2018 04:13:43 -0700 Message-ID: Subject: Re: [PATCH v3 3/5] bitmap: Add bitmap_alloc(), bitmap_zalloc() and bitmap_free() From: Andy Shevchenko To: Dmitry Torokhov , Andy Shevchenko Cc: Andrew Morton , agk@redhat.com, Mike Snitzer , device-mapper development , shli@kernel.org, linux-raid@vger.kernel.org, "linux-input@vger.kernel.org" , Yury Norov , lkml , Mika Westerberg , Joe Perches Date: Tue, 26 Jun 2018 14:13:42 +0300 In-Reply-To: <20180622184613.GC92912@dtor-ws> References: <20180618131003.88110-1-andriy.shevchenko@linux.intel.com> <20180618131003.88110-4-andriy.shevchenko@linux.intel.com> <20180618141404.68124daab97bd0f3a3051544@linux-foundation.org> <20180618161056.e52efd0e8bd36211e60705a2@linux-foundation.org> <20180622184613.GC92912@dtor-ws> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.1-2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2018-06-22 at 11:46 -0700, Dmitry Torokhov wrote: > On Thu, Jun 21, 2018 at 05:13:39AM +0300, Andy Shevchenko wrote: > > On Tue, Jun 19, 2018 at 2:10 AM, Andrew Morton > > wrote: > > > On Mon, 18 Jun 2018 15:01:43 -0700 Dmitry Torokhov > > v@gmail.com> wrote: > > > > We can't as we end up including bitmap.h (by the way of > > > > cpumask.h) > > > > form slab.h, so we gen circular dependency. > > > > It's not just so easy. See below. > > > > > That info should have been in the changelog, and probably a code > > > comment. > > > > > > > Maybe if we removed memcg > > > > stuff from slab.h so we do not need to include workqueue.h... > > > > > > Or move the basic slab API stuff out of slab.h into a new > > > header. Or > > > create a new, standalone work_struct.h - that looks pretty simple. > > > > I tried to move out work_struct, it didn't help. There are actually > > several circular dependencies that ends in bitmap.h either way or > > another. > > > > First one is > > > > slab.h -> gfp.h -> mmzone.h -> nodemask.h -> bitmap.h > > > > And so on... > > > > Splitting out kXalloc stuff to a separate header won't help, I > > think, > > because of the above. > > Splitting out struct work_struct is just a tip of an iceberg. > > Splitting out memcg stuff won't help in the similar way. > > > > I'm all ears for (a better) solution. > > I think ultimately we'd want to untangle this, but allocating bitmaps > is > not in any hot paths so having them as non-inlined functions should > not > hurt us that much for time being. Perhaps I can elaborate a bit in a commit message. Thanks for review! -- Andy Shevchenko Intel Finland Oy