Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1353450
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Dan Williams <dan.j.williams@intel.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] pmem: don't allocate unused major device number |
| Date | Tue, 08 Mar 2016 23:40:02 +0100 |
| Message-ID | <raysi-7ex-13@gated-at.bofh.it> (permalink) |
| References | <rayiC-7ah-13@gated-at.bofh.it> |
| X-Original-To | NeilBrown <neilb@suse.com> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=ykIEGEdu8//lSgr8oSncqHxWh9J2cFDqj2lzP3JjFRM=; b=ySehVdS0U7iG4p2jCNaPWryB5hlEjfIXUBC2v5/R9zuDHg4Yu6Sjg4B599o+orNVIr S9MkVnrlg26yUDa0aWogr753U7PEakDDpWcH/b/nc0aFrjw+5C6WOD314ichqRoARZmv nCF9bXbblGiq6KzRLSFpUkE4Ykd1XGUY/XQZt7qOs4VEomqUr1zaS3erc7T6wikx27Zm Hx/jEk3S41QzckVvNdfYdZX5LIX1zjQ3WGZQ03aA5bwXdm3PGEQyPKBHup8Oqki9REJj fkL39jusArWPWsDVnt3WaOTiSesQ4N2VvGopcmm2q5kHB+0YxVowgc4n9p3ExIAiCdFK Q6tw== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=ykIEGEdu8//lSgr8oSncqHxWh9J2cFDqj2lzP3JjFRM=; b=CwkPcfaMEKJcvZ/LmM8xpstWvR2Ee7M/bWHpejFtUorlTXBpBMGFblAmxQUgCB24C4 9yR77pN4wE9bFT3Ojl/G39M20EgwemAaMHN+kPc1Yyy4Wd5dGjSQ52PD0bisUJl3+MPt WMJ58eSdNwgsELcBt5GED/Z7Y6CVMzPMfVxIxYZ7L/DewKhdfGSqLVr0jg9HuvS0ds8V WJzv9/OcqPCFgcRJvwmOOpXk2sN4Ujg88A4zEM27K9mIh2aQjm8V4xzLyrjnPX5TMjwc fscYBJDGi5HqQK2n7eNCvWGL5kEr1dlzLxBbLiGo0/oZxs2HglSOmreb3DbltnFRCuEO OlvQ== |
| X-Gm-Message-State | AD7BkJKfQYSCqKjqWcBrBaQ9tBQD31hHfSb1yzVcQU+WbbMIdvzR/88yueX/JhmwKdloVaJ1eSdlKUIgJpJx1BAN |
| MIME-Version | 1.0 |
| X-Received | by 10.60.150.235 with SMTP id ul11mr8438358oeb.70.1457476198296; Tue, 08 Mar 2016 14:29:58 -0800 (PST) |
| Content-Type | text/plain; charset=UTF-8 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 42 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Ross Zwisler <ross.zwisler@linux.intel.com>, "linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> |
| X-Original-Date | Tue, 8 Mar 2016 14:29:58 -0800 |
| X-Original-Message-ID | <CAPcyv4guybB1QRqqjjvWsjKvpJjnc=qf81iT-E77-GonAApKCw@mail.gmail.com> |
| X-Original-References | <87k2lclif1.fsf@notabene.neil.brown.name> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1353450 |
Show key headers only | View raw
On Tue, Mar 8, 2016 at 2:21 PM, NeilBrown <neilb@suse.com> wrote:
>
> When alloc_disk(0) or alloc_disk-node(0, XX) is used, the ->major
> number is completely ignored: all devices are allocated with a
> major of BLOCK_EXT_MAJOR.
>
> So there is no point allocating pmem_major.
>
> Signed-off-by: NeilBrown <neilb@suse.com>
> ---
> drivers/nvdimm/pmem.c | 19 +------------------
> 1 file changed, 1 insertion(+), 18 deletions(-)
>
> Hi Dan et al,
> I was recently educating myself about the behavior of alloc_disk(0).
> As I understand it, the ->major is ignored and all device numbers for all
> partitions (including '0') are allocated on demand with major number of
> BLOCK_EXT_MAJOR.
>
> So I was a little surprised to find that pmem.c allocated a major
> number which is never used - historical anomaly I suspect.
> I was a bit more surprised at the comment in:
>
> Commit: 9f53f9fa4ad1 ("libnvdimm, pmem: add libnvdimm support to the pmem driver")
>
> "The minor numbers are also more predictable by passing 0 to alloc_disk()."
>
> How can they possibly be more predictable given that they are allocated
> on-demand? Maybe discovery order is very predictable???
Ross, I remember you looked into this when Boaz pointed out something similar.
> In any case, I propose this patch but cannot test it (beyond compiling)
> as I don't have relevant hardware. And maybe some user-space code greps
> /proc/devices for "pmem" to determine if "pmem" is compiled in (though
> I sincerely hope not).
> So I cannot be certain that this patch won't break anything, but am
> hoping that if you like it you might test it.
Will do.
Thanks Neil!
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] pmem: don't allocate unused major device number NeilBrown <neilb@suse.com> - 2016-03-08 23:30 +0100
Re: [PATCH] pmem: don't allocate unused major device number Dan Williams <dan.j.williams@intel.com> - 2016-03-08 23:40 +0100
Re: [PATCH] pmem: don't allocate unused major device number Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-03-09 20:00 +0100
Re: [PATCH] pmem: don't allocate unused major device number Dan Williams <dan.j.williams@intel.com> - 2016-03-09 20:30 +0100
csiph-web