Skip to content

Commit 6885938

Browse files
Jiaqi Yanakpm00
authored andcommitted
mm/hwpoison: rename hwp_walk* to hwpoison_walk*
In the discussion of "Improve hugetlbfs read on HWPOISON hugepages" [1], Matthew Wilcox suggests hwp is a bad abbreviation of hwpoison, as hwp is already used as "an acronym by acpi, intel_pstate, some clock drivers, an ethernet driver, and a scsi driver"[1]. So rename hwp_walk and hwp_walk_ops to hwpoison_walk and hwpoison_walk_ops respectively. raw_hwp_(page|list), *_raw_hwp, and raw_hwp_unreliable flag are other major appearances of "hwp". However, given the "raw" hint in the name, it is easy to differentiate them from other "hwp" acronyms. Since renaming them is not as straightforward as renaming hwp_walk*, they are not covered by this commit. [1] https://lore.kernel.org/lkml/[email protected]/T/#me6fecb8ce1ad4d5769199c9e162a44bc88f7bdec Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Jiaqi Yan <[email protected]> Reviewed-by: Anshuman Khandual <[email protected]> Acked-by: Naoya Horiguchi <[email protected]> Cc: Matthew Wilcox (Oracle) <[email protected]> Cc: Miaohe Lin <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 7a8817f commit 6885938

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

mm/memory-failure.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ static void collect_procs(struct page *page, struct list_head *tokill,
717717
collect_procs_file(page, tokill, force_early);
718718
}
719719

720-
struct hwp_walk {
720+
struct hwpoison_walk {
721721
struct to_kill tk;
722722
unsigned long pfn;
723723
int flags;
@@ -752,7 +752,7 @@ static int check_hwpoisoned_entry(pte_t pte, unsigned long addr, short shift,
752752

753753
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
754754
static int check_hwpoisoned_pmd_entry(pmd_t *pmdp, unsigned long addr,
755-
struct hwp_walk *hwp)
755+
struct hwpoison_walk *hwp)
756756
{
757757
pmd_t pmd = *pmdp;
758758
unsigned long pfn;
@@ -770,7 +770,7 @@ static int check_hwpoisoned_pmd_entry(pmd_t *pmdp, unsigned long addr,
770770
}
771771
#else
772772
static int check_hwpoisoned_pmd_entry(pmd_t *pmdp, unsigned long addr,
773-
struct hwp_walk *hwp)
773+
struct hwpoison_walk *hwp)
774774
{
775775
return 0;
776776
}
@@ -779,7 +779,7 @@ static int check_hwpoisoned_pmd_entry(pmd_t *pmdp, unsigned long addr,
779779
static int hwpoison_pte_range(pmd_t *pmdp, unsigned long addr,
780780
unsigned long end, struct mm_walk *walk)
781781
{
782-
struct hwp_walk *hwp = walk->private;
782+
struct hwpoison_walk *hwp = walk->private;
783783
int ret = 0;
784784
pte_t *ptep, *mapped_pte;
785785
spinlock_t *ptl;
@@ -813,7 +813,7 @@ static int hwpoison_hugetlb_range(pte_t *ptep, unsigned long hmask,
813813
unsigned long addr, unsigned long end,
814814
struct mm_walk *walk)
815815
{
816-
struct hwp_walk *hwp = walk->private;
816+
struct hwpoison_walk *hwp = walk->private;
817817
pte_t pte = huge_ptep_get(ptep);
818818
struct hstate *h = hstate_vma(walk->vma);
819819

@@ -824,7 +824,7 @@ static int hwpoison_hugetlb_range(pte_t *ptep, unsigned long hmask,
824824
#define hwpoison_hugetlb_range NULL
825825
#endif
826826

827-
static const struct mm_walk_ops hwp_walk_ops = {
827+
static const struct mm_walk_ops hwpoison_walk_ops = {
828828
.pmd_entry = hwpoison_pte_range,
829829
.hugetlb_entry = hwpoison_hugetlb_range,
830830
.walk_lock = PGWALK_RDLOCK,
@@ -847,7 +847,7 @@ static int kill_accessing_process(struct task_struct *p, unsigned long pfn,
847847
int flags)
848848
{
849849
int ret;
850-
struct hwp_walk priv = {
850+
struct hwpoison_walk priv = {
851851
.pfn = pfn,
852852
};
853853
priv.tk.tsk = p;
@@ -856,7 +856,7 @@ static int kill_accessing_process(struct task_struct *p, unsigned long pfn,
856856
return -EFAULT;
857857

858858
mmap_read_lock(p->mm);
859-
ret = walk_page_range(p->mm, 0, TASK_SIZE, &hwp_walk_ops,
859+
ret = walk_page_range(p->mm, 0, TASK_SIZE, &hwpoison_walk_ops,
860860
(void *)&priv);
861861
if (ret == 1 && priv.tk.addr)
862862
kill_proc(&priv.tk, pfn, flags);

0 commit comments

Comments
 (0)