linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Huan Yang <link@vivo.com>
To: Christoph Hellwig <hch@lst.de>
Cc: akpm@linux-foundation.org, bingbu.cao@linux.intel.com,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	lorenzo.stoakes@oracle.com, opensource.kernel@vivo.com,
	rppt@kernel.org, ryan.roberts@arm.com, urezki@gmail.com,
	ziy@nvidia.com, vivek.kasireddy@intel.com
Subject: Re: [PATCH] mm/vmalloc: fix mischeck pfn valid in vmap_pfns
Date: Tue, 18 Mar 2025 16:50:54 +0800	[thread overview]
Message-ID: <59656301-8224-407b-a16a-868a314f29f9@vivo.com> (raw)
In-Reply-To: <20250318084453.GB19274@lst.de>

HI Christoph

在 2025/3/18 16:44, Christoph Hellwig 写道:
> [You don't often get email from hch@lst.de. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> On Tue, Mar 18, 2025 at 04:39:40PM +0800, Huan Yang wrote:
>> A folio may be 2MB or more large 1GB, what if we only need a little, 1M or 512MB, can vmap based on folio can solve it?
> Then you only map part of it by passing a length argument.  Note that
> in general when you have these large folios you also don't have highmem,
> so if you only map one of them, or part of one of them you don't actually
> need vmap at all and can just use folio-address..

The situation remains complex. We are not only referring to this single folio, but it may be composed

of multiple folios and start with a small piece. For example:

Folio 1 2M - use 1M

Folio 2 2M - use 2M

....

Combine these folios into memory used by udmabuf. So, directly virtual memory useless. :)

>
>> Normally, can offer 4k-page based array map it. But consider HVO, can't. That's why wanto base on pfn.
> Well, for any large folio using this 4k based page interface is
> actually highly inefficient.  So let's fix that.  And my loop in
Yes, indeed. You mentioned good to entire folio array mapped into vmalloc, I guest here are many user like it.
> willy as Mr. Folio while you're at it.
I'd like to research it, but not too fast. :)
>


  reply	other threads:[~2025-03-18  8:51 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-12  6:15 Huan Yang
2025-03-12  6:18 ` Christoph Hellwig
2025-03-17  2:12   ` Huan Yang
2025-03-17  5:29     ` Bingbu Cao
2025-03-17  5:53       ` Christoph Hellwig
2025-03-17  7:42         ` Huan Yang
2025-03-18  6:48           ` Christoph Hellwig
2025-03-18  8:20             ` Huan Yang
2025-03-18  8:33               ` Christoph Hellwig
2025-03-18  8:39                 ` Huan Yang
2025-03-18  8:44                   ` Christoph Hellwig
2025-03-18  8:50                     ` Huan Yang [this message]
     [not found]                     ` <20250319050359.3484-1-hdanton@sina.com>
2025-03-19  8:08                       ` Christoph Hellwig
     [not found]                       ` <20250319112651.3502-1-hdanton@sina.com>
2025-03-24  2:13                         ` Huan Yang
2025-03-25  6:32                           ` Kasireddy, Vivek
2025-03-25  6:46                             ` Bingbu Cao
2025-03-27 13:40                           ` Matthew Wilcox
2025-03-28  6:13                             ` Huan Yang
2025-03-19  9:09                     ` Gao Xiang
2025-03-20  5:31                       ` Christoph Hellwig
2025-03-24  2:22                         ` Huan Yang
2025-03-24  2:57                 ` Matthew Wilcox
2025-03-17  6:26       ` Huan Yang

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=59656301-8224-407b-a16a-868a314f29f9@vivo.com \
    --to=link@vivo.com \
    --cc=akpm@linux-foundation.org \
    --cc=bingbu.cao@linux.intel.com \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=opensource.kernel@vivo.com \
    --cc=rppt@kernel.org \
    --cc=ryan.roberts@arm.com \
    --cc=urezki@gmail.com \
    --cc=vivek.kasireddy@intel.com \
    --cc=ziy@nvidia.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
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