From: Andrew Morton <akpm@linux-foundation.org>
To: "Thomas Hellström" <thomas_os@shipmail.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org, pv-drivers@vmware.com,
linux-graphics-maintainer@vmware.com,
"Thomas Hellstrom" <thellstrom@vmware.com>,
"Michal Hocko" <mhocko@suse.com>,
"Matthew Wilcox (Oracle)" <willy@infradead.org>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
"Ralph Campbell" <rcampbell@nvidia.com>,
"Jérôme Glisse" <jglisse@redhat.com>,
"Christian König" <christian.koenig@amd.com>
Subject: Re: [PATCH 1/8] mm: Introduce vma_is_special_huge
Date: Sat, 29 Feb 2020 20:04:45 -0800 [thread overview]
Message-ID: <20200229200445.a30567add92de324fd1987f0@linux-foundation.org> (raw)
In-Reply-To: <20191203132239.5910-2-thomas_os@shipmail.org>
On Tue, 3 Dec 2019 14:22:32 +0100 Thomas Hellström (VMware) <thomas_os@shipmail.org> wrote:
> From: Thomas Hellstrom <thellstrom@vmware.com>
>
> For VM_PFNMAP and VM_MIXEDMAP vmas that want to support transhuge pages
> and -page table entries, introduce vma_is_special_huge() that takes the
> same codepaths as vma_is_dax().
>
> The use of "special" follows the definition in memory.c, vm_normal_page():
> "Special" mappings do not wish to be associated with a "struct page"
> (either it doesn't exist, or it exists but they don't want to touch it)
>
> For PAGE_SIZE pages, "special" is determined per page table entry to be
> able to deal with COW pages. But since we don't have huge COW pages,
> we can classify a vma as either "special huge" or "normal huge".
>
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -2822,6 +2822,12 @@ extern long copy_huge_page_from_user(struct page *dst_page,
> const void __user *usr_src,
> unsigned int pages_per_huge_page,
> bool allow_pagefault);
> +static inline bool vma_is_special_huge(struct vm_area_struct *vma)
> +{
> + return vma_is_dax(vma) || (vma->vm_file &&
> + (vma->vm_flags & (VM_PFNMAP | VM_MIXEDMAP)));
> +}
Some documetnation would be nice. Not only what it does, but why it
does it. ie, what is the *meaning* of vma_is_spacial_huge(vma)==true?
next prev parent reply other threads:[~2020-03-01 4:04 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-03 13:22 [PATCH 0/8] Huge page-table entries for TTM Thomas Hellström (VMware)
2019-12-03 13:22 ` [PATCH 1/8] mm: Introduce vma_is_special_huge Thomas Hellström (VMware)
2020-03-01 4:04 ` Andrew Morton [this message]
2019-12-03 13:22 ` [PATCH 2/8] mm: Split huge pages on write-notify or COW Thomas Hellström (VMware)
2020-03-01 4:04 ` Andrew Morton
2019-12-03 13:22 ` [PATCH 3/8] mm: Add vmf_insert_pfn_xxx_prot() for huge page-table entries Thomas Hellström (VMware)
2019-12-03 13:22 ` [PATCH 4/8] drm/ttm, drm/vmwgfx: Support huge TTM pagefaults Thomas Hellström (VMware)
2019-12-03 13:22 ` [PATCH 5/8] drm/vmwgfx: Support huge page faults Thomas Hellström (VMware)
2019-12-03 13:22 ` [PATCH 6/8] drm: Add a drm_get_unmapped_area() helper Thomas Hellström (VMware)
2019-12-04 11:11 ` Christian König
2019-12-04 11:36 ` Thomas Hellström (VMware)
2019-12-04 12:08 ` Christian König
2019-12-04 12:32 ` Thomas Hellström (VMware)
2019-12-04 14:40 ` Christian König
2019-12-04 15:36 ` Thomas Hellström (VMware)
2019-12-03 13:22 ` [PATCH 7/8] drm/ttm: Introduce a huge page aligning TTM range manager Thomas Hellström (VMware)
2019-12-04 11:13 ` Christian König
2019-12-04 11:45 ` Thomas Hellström (VMware)
2019-12-04 12:16 ` Christian König
2019-12-04 13:18 ` Thomas Hellström (VMware)
2019-12-04 14:02 ` Christian König
2019-12-03 13:22 ` [PATCH 8/8] drm/vmwgfx: Hook up the helpers to align buffer objects Thomas Hellström (VMware)
2020-03-01 4:04 ` [PATCH 0/8] Huge page-table entries for TTM Andrew Morton
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=20200229200445.a30567add92de324fd1987f0@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jglisse@redhat.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-graphics-maintainer@vmware.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=pv-drivers@vmware.com \
--cc=rcampbell@nvidia.com \
--cc=thellstrom@vmware.com \
--cc=thomas_os@shipmail.org \
--cc=willy@infradead.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