Linux-NVDIMM Archive on lore.kernel.org
 help / color / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: Won-Kyo Choe <wkyo.choe@gmail.com>
Cc: linux-nvdimm <linux-nvdimm@lists.01.org>
Subject: Re: [QUESTION] Error on initializing dax by using different struct page size
Date: Thu, 7 Nov 2019 11:24:30 -0800
Message-ID: <CAPcyv4hNYZvXP+Cg+sHtes6qisrkxoMAf=oi0x3NqOHxWNG53w@mail.gmail.com> (raw)
In-Reply-To: <20191107190018.GB1912@swarm07>

On Thu, Nov 7, 2019 at 11:00 AM Won-Kyo Choe <wkyo.choe@gmail.com> wrote:
>
> On Thu, Nov 07, 2019 at 07:54:21AM -0800, Dan Williams wrote:
> > On Thu, Nov 7, 2019 at 7:30 AM Won-Kyo Choe <wkyo.choe@gmail.com> wrote:
> > >
> > > Hi, there. I'm using Opatne DC memory to use it a volatile memory. Recently,
> > > I found that if sizeof(struct page) is above 64 bytes (e.g. 128 byes),
> > > `device_dax` cannot be initialized when system boots. I am aware that
> > > for some reason there is a function, `__mm_zero_struct_page`, which limits
> > > the size of struct page when it exceeds 80 bytes. However, due to the
> > > research purpose, I do not use that constraint and I'm quite certain
> > > that using different page size is usable in main memory. So, I'm
> > > wondering why this is not possible in persistent memory and which
> > > patches are related to this problem.
> > >
> > > I will attach the system log for clarification. The test is run in
> > > linux-5.3.9 and linuxt-5.3-rc5
> >
> > How did you manage to build the kernel with a 128byte struct page
> > size? This build assert in drivers/nvdimm/pfn_devs.c
> >
> >                 BUILD_BUG_ON(sizeof(struct page) > MAX_STRUCT_PAGE_SIZE);
> >
> > ...will start to trigger in v5.4 to explicitly prevent this going
> > forward. See commit e96f0bf2ec92 "libnvdimm/pfn_dev: Add a build check
> > to make sure we notice when struct page size change" for more details.
> >
> Thanks for the related commit. The kernel that I am using (5.3.9 / 5.3-rc5) does
> not have the assert so that I was able to build it by little bit modifying lines
> in include/linux/mm.h
>
>         BUILD_BUG_ON(sizeof(struct page) > 80);
>         ...
>
> , which is quite similar with the assert you referred.
>
> > In general 64-bytes per page is already expensive 128 bytes is a
> > gigantic struct page.
> Yes. I am aware that issue. I just wanted to add hot-page tracking
> feature by inserting some data structure collecting it inside struct page
> but the size is matter. I should find another way to get that stat :)

For hot page tracking you may want to look at some of the discussion
around Memory Hierarchy support:

https://lore.kernel.org/linux-mm/c3d6de4d-f7c3-b505-2e64-8ee5f70b2118@intel.com/
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

  reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-07 15:29 Won-Kyo Choe
2019-11-07 15:54 ` Dan Williams
2019-11-07 19:00   ` Won-Kyo Choe
2019-11-07 19:24     ` Dan Williams [this message]
2019-11-08  4:26       ` Won-Kyo Choe

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPcyv4hNYZvXP+Cg+sHtes6qisrkxoMAf=oi0x3NqOHxWNG53w@mail.gmail.com' \
    --to=dan.j.williams@intel.com \
    --cc=linux-nvdimm@lists.01.org \
    --cc=wkyo.choe@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-NVDIMM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-nvdimm/0 linux-nvdimm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-nvdimm linux-nvdimm/ https://lore.kernel.org/linux-nvdimm \
		linux-nvdimm@lists.01.org
	public-inbox-index linux-nvdimm

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.01.lists.linux-nvdimm


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git