Skip to content

Commit 4958e4d

Browse files
Yang Shitorvalds
authored andcommitted
mm: thp: remove debug_cow switch
Since commit 3917c80 ("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 <yang.shi@linux.alibaba.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Zi Yan <ziy@nvidia.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Link: http://lkml.kernel.org/r/1592270980-116062-1-git-send-email-yang.shi@linux.alibaba.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent b0fc0f3 commit 4958e4d

File tree

2 files changed

+0
-28
lines changed

2 files changed

+0
-28
lines changed

include/linux/huge_mm.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,6 @@ static inline bool transhuge_vma_suitable(struct vm_area_struct *vma,
181181
#define transparent_hugepage_use_zero_page() \
182182
(transparent_hugepage_flags & \
183183
(1<<TRANSPARENT_HUGEPAGE_USE_ZERO_PAGE_FLAG))
184-
#ifdef CONFIG_DEBUG_VM
185-
#define transparent_hugepage_debug_cow() \
186-
(transparent_hugepage_flags & \
187-
(1<<TRANSPARENT_HUGEPAGE_DEBUG_COW_FLAG))
188-
#else /* CONFIG_DEBUG_VM */
189-
#define transparent_hugepage_debug_cow() 0
190-
#endif /* CONFIG_DEBUG_VM */
191184

192185
extern unsigned long thp_get_unmapped_area(struct file *filp,
193186
unsigned long addr, unsigned long len, unsigned long pgoff,

mm/huge_memory.c

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -303,34 +303,13 @@ static ssize_t hpage_pmd_size_show(struct kobject *kobj,
303303
static struct kobj_attribute hpage_pmd_size_attr =
304304
__ATTR_RO(hpage_pmd_size);
305305

306-
#ifdef CONFIG_DEBUG_VM
307-
static ssize_t debug_cow_show(struct kobject *kobj,
308-
struct kobj_attribute *attr, char *buf)
309-
{
310-
return single_hugepage_flag_show(kobj, attr, buf,
311-
TRANSPARENT_HUGEPAGE_DEBUG_COW_FLAG);
312-
}
313-
static ssize_t debug_cow_store(struct kobject *kobj,
314-
struct kobj_attribute *attr,
315-
const char *buf, size_t count)
316-
{
317-
return single_hugepage_flag_store(kobj, attr, buf, count,
318-
TRANSPARENT_HUGEPAGE_DEBUG_COW_FLAG);
319-
}
320-
static struct kobj_attribute debug_cow_attr =
321-
__ATTR(debug_cow, 0644, debug_cow_show, debug_cow_store);
322-
#endif /* CONFIG_DEBUG_VM */
323-
324306
static struct attribute *hugepage_attr[] = {
325307
&enabled_attr.attr,
326308
&defrag_attr.attr,
327309
&use_zero_page_attr.attr,
328310
&hpage_pmd_size_attr.attr,
329311
#ifdef CONFIG_SHMEM
330312
&shmem_enabled_attr.attr,
331-
#endif
332-
#ifdef CONFIG_DEBUG_VM
333-
&debug_cow_attr.attr,
334313
#endif
335314
NULL,
336315
};

0 commit comments

Comments
 (0)