Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1184653imm; Fri, 22 Jun 2018 11:48:01 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIDWIRJdUzFPB7LKanAEy/I+NYRnaTbDv2Uf+KVUS3YMnglOP9EKH3enBomfQUKsxVZXB2i X-Received: by 2002:a63:62c4:: with SMTP id w187-v6mr2446450pgb.55.1529693280991; Fri, 22 Jun 2018 11:48:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529693280; cv=none; d=google.com; s=arc-20160816; b=ZhVnRo1XrIiDq4WKAgYwuLRU8FtLU0relAeV0szwrrvbo54p/qLbjeFi+8s3LbT5j5 r2srUlnP56f3D0S4evvRByDr6mlilwFdqDu/gkj09TqHvbj5+JhiLf1Opl8+5DxDkj1M zLyOt0yrrrcOMP0M5y7zt7C1MjMN3CApL7t7q3nNlVwlMPLY9n95r8OzJvVwqsMSq3V+ Ff1YhaLdlm6w0fwyil24ZQZNN+nPJ0tZUAgpd/oB7Y8FpEXR4YML9TZcN0QOSoiYoNmu rFxv96GZlyEFzPBQpLAo1mYuSlUK+//PDLgtXowMKo3lukql1E9/vlRgNbc00/WKvlK8 O9vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=rXkqddkMzEb07pJDJliCPzlM66xSj7yASHw2MBPqpNU=; b=zVRS9hPmBo1gdEz88om6/DGfVj8p3Qvc7ntqO5Rs1aZJeOb5NXOiEiAaAoPeMrZ3ck 2cpz0yyDoUJQ0znvVm1gLxKrjicsRr1s9Sutpa5ZQqvIpFqzSQn9CNMYbTC8rJk2JSuX MAZIyOEW+I2sP49UJUxN86fRgoaOCyGHBv7YW5oZNHoP56kvnrZFrldWx72Pk38e++nL IrlXvDjnCd1c9wF5ZPw0vhxERtu2O6g3+Tg7KCiZNIbsBwOESdcluR99X9GNwQeZ6AXl Kk1k0t10+/wysXa1JCELNOpa8/ih3jUbWG9mU74C0hanKEO7jccB5kr0vCD5dJPU7OFE ZuKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=b2AR4cnF; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a21-v6si7743154pls.237.2018.06.22.11.47.46; Fri, 22 Jun 2018 11:48:00 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=b2AR4cnF; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934244AbeFVSqU (ORCPT + 99 others); Fri, 22 Jun 2018 14:46:20 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:37899 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933878AbeFVSqR (ORCPT ); Fri, 22 Jun 2018 14:46:17 -0400 Received: by mail-pf0-f194.google.com with SMTP id b74-v6so3616195pfl.5; Fri, 22 Jun 2018 11:46:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=rXkqddkMzEb07pJDJliCPzlM66xSj7yASHw2MBPqpNU=; b=b2AR4cnFqb/FvvR+m/q8YjoiXzGd1iiaUS/YtRFdInswLMM3tlbI71HMihruKk3BCF 1aLXRq+dJu8KwS2ECOjhAkjbzCfGorqd/rbL2hSEDAKbyTEdOJMkKJEJOx+AM51oohkm MfWZz6QB2WJsBpwLtQ9yASLOwNCkCiDDh7JT40GxNybCHEomwrfvgHptP3xOPwZJc9NM MCI0f0n1wxgXVF4aKf4lMLEupWfuu7UjR6jt0sZoGDJz0R++UgrsQ9mepKPcTcpPHuax flYGxix0Q4nLsL689ib+PcTZK1Qa96zkI2U5cJAo0c69Y2hekiwiTMkecixiRm7WifXR PQxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=rXkqddkMzEb07pJDJliCPzlM66xSj7yASHw2MBPqpNU=; b=cgxcz3SnwyQaWSA96uynbhH1d+1sWT4qIvEbhIjby8hDBN31EL4E6Zzu8YUq87/Plq R1kDTzjL/Pt7VFtkzK+MBk9TIMNfuryW07qgql2FMNXqv5yj0bqZmAP4UU8CQ1R2WliY JZXCh4LYeS23y3sXOQFo13B7VHL53uHP7/HCaB/4QBn0TBJCu5CWArFvqIA67KIvrCS2 PnkG+/yDobSNG8HmiibLkTaUFN4QapLd351T8F/1PxamvbOj14my+9VS0jnfwyVdUOQw F6eBk6PcBpf2uGsLgLBLUaJKRkhVVAoKFV1oaf6LPee6bACKs5fkiQxYoTkG0QOJGeOL P9yw== X-Gm-Message-State: APt69E2qbKjYigrFT2AjT6MlYpx+apO0HJY8KtGF7/mdK7mGgGAPdVIW B8JJIrizZnMdhyovFBTNOAmZpq6+ X-Received: by 2002:a65:6319:: with SMTP id g25-v6mr2470767pgv.437.1529693176601; Fri, 22 Jun 2018 11:46:16 -0700 (PDT) Received: from dtor-ws ([2620:0:1000:1511:8de6:27a8:ed13:2ef5]) by smtp.gmail.com with ESMTPSA id q77-v6sm19192271pfk.152.2018.06.22.11.46.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 Jun 2018 11:46:15 -0700 (PDT) Date: Fri, 22 Jun 2018 11:46:13 -0700 From: Dmitry Torokhov To: Andy Shevchenko Cc: Andrew Morton , Andy Shevchenko , 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 Subject: Re: [PATCH v3 3/5] bitmap: Add bitmap_alloc(), bitmap_zalloc() and bitmap_free() Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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. Just my 2 cents... -- Dmitry