linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: lizhe.67@bytedance.com
To: hpa@zytor.com
Cc: bp@alien8.de, dave.hansen@intel.com, dave.hansen@linux.intel.com,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	lizefan.x@bytedance.com, lizhe.67@bytedance.com,
	mingo@redhat.com, tglx@linutronix.de, x86@kernel.org
Subject: Re: [RFC] memmap: introduce cmdline parameter "memmap=nn[KMG]$" without start addr
Date: Tue, 28 Jun 2022 20:34:02 +0800	[thread overview]
Message-ID: <20220628123402.14573-1-lizhe.67@bytedance.com> (raw)
In-Reply-To: <0EA9CBD4-D083-4546-BFAC-9C3A97420E5B@zytor.com>

On Thu, 23 Jun 2022 11:22:52, H. Peter Anvin <hpa@zytor.com> wrote:
>>On 6/22/22 23:24, lizhe.67@bytedance.com wrote:
>>> In our scenario, we need reserve or alloc large continous memory like
>>> 256M in machine which have different memory specification at just
>>> boot phase for a user land process.
>>
>>Just marking the memory reserved doesn't do any good by itself.  There
>>must be some *other* kernel code to find this reserved area and make it
>>available to userspace.
>>
>>It seems kinda silly to add this to the kernel without also adding the
>>other half of the solution.  Plus, we don't really even know what this
>>is for.  Are there other, better solutions?  I certainly can't offer any
>>because this changelog did not provide a full picture of the problem
>>this solves.
>
>Don't we already have a large contiguous physical memory allocator for this reason (misdesigned hardware?)

Yes we have already considered using CMA to realize the requirement. But CMA
only provides several kernel space interface for memory allocation. It seems
that userspace do not have a way to access those memory at current kernel.
In our scenario, we need to reserve large continuous physical memory for a
userspace program. It stores some data into memory and a hardware will consume
them. So allocing an area of large continuous memory for userspace program is
the best way for us.

  reply	other threads:[~2022-06-28 12:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-23  6:24 [RFC] memmap: introduce cmdline parameter "memmap=nn[KMG]$" without start addr lizhe.67
2022-06-23 14:06 ` Dave Hansen
2022-06-23 18:22   ` H. Peter Anvin
2022-06-28 12:34     ` lizhe.67 [this message]
2022-06-28 12:30   ` lizhe.67

Reply instructions:

You may reply publicly 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=20220628123402.14573-1-lizhe.67@bytedance.com \
    --to=lizhe.67@bytedance.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan.x@bytedance.com \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).