mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 14:23:49 +01:00
mm: thp: remove debug_cow switch
Since commit 3917c80280 ("thp: change CoW semantics for
anon-THP"), the CoW page fault of THP has been rewritten, debug_cow is not
used anymore. So, just remove it.
Signed-off-by: Yang Shi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Reviewed-by: Zi Yan <[email protected]>
Cc: Kirill A. Shutemov <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
1 parent
b0fc0f3fca
commit
4958e4d86e
2 files changed
-28
No files matched your search
@@ -181,13 +181,6 @@ static inline bool transhuge_vma_suitable(struct vm_area_struct *vma,
|
||||
#define transparent_hugepage_use_zero_page() \
|
||||
(transparent_hugepage_flags & \
|
||||
(1<<TRANSPARENT_HUGEPAGE_USE_ZERO_PAGE_FLAG))
|
||||
#ifdef CONFIG_DEBUG_VM
|
||||
#define transparent_hugepage_debug_cow() \
|
||||
(transparent_hugepage_flags & \
|
||||
(1<<TRANSPARENT_HUGEPAGE_DEBUG_COW_FLAG))
|
||||
#else /* CONFIG_DEBUG_VM */
|
||||
#define transparent_hugepage_debug_cow() 0
|
||||
#endif /* CONFIG_DEBUG_VM */
|
||||
|
||||
extern unsigned long thp_get_unmapped_area(struct file *filp,
|
||||
unsigned long addr, unsigned long len, unsigned long pgoff,
|
||||
|
||||
@@ -303,24 +303,6 @@ static ssize_t hpage_pmd_size_show(struct kobject *kobj,
|
||||
static struct kobj_attribute hpage_pmd_size_attr =
|
||||
__ATTR_RO(hpage_pmd_size);
|
||||
|
||||
#ifdef CONFIG_DEBUG_VM
|
||||
static ssize_t debug_cow_show(struct kobject *kobj,
|
||||
struct kobj_attribute *attr, char *buf)
|
||||
{
|
||||
return single_hugepage_flag_show(kobj, attr, buf,
|
||||
TRANSPARENT_HUGEPAGE_DEBUG_COW_FLAG);
|
||||
}
|
||||
static ssize_t debug_cow_store(struct kobject *kobj,
|
||||
struct kobj_attribute *attr,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
return single_hugepage_flag_store(kobj, attr, buf, count,
|
||||
TRANSPARENT_HUGEPAGE_DEBUG_COW_FLAG);
|
||||
}
|
||||
static struct kobj_attribute debug_cow_attr =
|
||||
__ATTR(debug_cow, 0644, debug_cow_show, debug_cow_store);
|
||||
#endif /* CONFIG_DEBUG_VM */
|
||||
|
||||
static struct attribute *hugepage_attr[] = {
|
||||
&enabled_attr.attr,
|
||||
&defrag_attr.attr,
|
||||
@@ -328,9 +310,6 @@ static struct attribute *hugepage_attr[] = {
|
||||
&hpage_pmd_size_attr.attr,
|
||||
#ifdef CONFIG_SHMEM
|
||||
&shmem_enabled_attr.attr,
|
||||
#endif
|
||||
#ifdef CONFIG_DEBUG_VM
|
||||
&debug_cow_attr.attr,
|
||||
#endif
|
||||
NULL,
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user