* [PATCH] mm/memory-failure.c: replace with page_shift() in add_to_kill()
@ 2019-11-05 8:21 Yunfeng Ye
2019-11-05 8:57 ` David Hildenbrand
2019-11-05 9:09 ` Naoya Horiguchi
0 siblings, 2 replies; 3+ messages in thread
From: Yunfeng Ye @ 2019-11-05 8:21 UTC (permalink / raw)
To: n-horiguchi; +Cc: linux-mm, linux-kernel, hushiyuan, linfeilong
The function page_shift() is supported after the commit 94ad9338109f
("mm: introduce page_shift()").
So replace with page_shift() in add_to_kill() for readability.
Signed-off-by: Yunfeng Ye <yeyunfeng@huawei.com>
---
mm/memory-failure.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 3151c87dff73..e48c50cac889 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -326,7 +326,7 @@ static void add_to_kill(struct task_struct *tsk, struct page *p,
if (is_zone_device_page(p))
tk->size_shift = dev_pagemap_mapping_shift(p, vma);
else
- tk->size_shift = compound_order(compound_head(p)) + PAGE_SHIFT;
+ tk->size_shift = page_shift(compound_head(p));
/*
* Send SIGKILL if "tk->addr == -EFAULT". Also, as
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mm/memory-failure.c: replace with page_shift() in add_to_kill()
2019-11-05 8:21 [PATCH] mm/memory-failure.c: replace with page_shift() in add_to_kill() Yunfeng Ye
@ 2019-11-05 8:57 ` David Hildenbrand
2019-11-05 9:09 ` Naoya Horiguchi
1 sibling, 0 replies; 3+ messages in thread
From: David Hildenbrand @ 2019-11-05 8:57 UTC (permalink / raw)
To: Yunfeng Ye, n-horiguchi; +Cc: linux-mm, linux-kernel, hushiyuan, linfeilong
On 05.11.19 09:21, Yunfeng Ye wrote:
> The function page_shift() is supported after the commit 94ad9338109f
> ("mm: introduce page_shift()").
>
> So replace with page_shift() in add_to_kill() for readability.
>
> Signed-off-by: Yunfeng Ye <yeyunfeng@huawei.com>
> ---
> mm/memory-failure.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> index 3151c87dff73..e48c50cac889 100644
> --- a/mm/memory-failure.c
> +++ b/mm/memory-failure.c
> @@ -326,7 +326,7 @@ static void add_to_kill(struct task_struct *tsk, struct page *p,
> if (is_zone_device_page(p))
> tk->size_shift = dev_pagemap_mapping_shift(p, vma);
> else
> - tk->size_shift = compound_order(compound_head(p)) + PAGE_SHIFT;
> + tk->size_shift = page_shift(compound_head(p));
>
> /*
> * Send SIGKILL if "tk->addr == -EFAULT". Also, as
>
Reviewed-by: David Hildenbrand <david@redhat.com>
--
Thanks,
David / dhildenb
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mm/memory-failure.c: replace with page_shift() in add_to_kill()
2019-11-05 8:21 [PATCH] mm/memory-failure.c: replace with page_shift() in add_to_kill() Yunfeng Ye
2019-11-05 8:57 ` David Hildenbrand
@ 2019-11-05 9:09 ` Naoya Horiguchi
1 sibling, 0 replies; 3+ messages in thread
From: Naoya Horiguchi @ 2019-11-05 9:09 UTC (permalink / raw)
To: Yunfeng Ye; +Cc: linux-mm, linux-kernel, hushiyuan, linfeilong
On Tue, Nov 05, 2019 at 04:21:44PM +0800, Yunfeng Ye wrote:
> The function page_shift() is supported after the commit 94ad9338109f
> ("mm: introduce page_shift()").
>
> So replace with page_shift() in add_to_kill() for readability.
>
> Signed-off-by: Yunfeng Ye <yeyunfeng@huawei.com>
Acked-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-11-05 9:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-05 8:21 [PATCH] mm/memory-failure.c: replace with page_shift() in add_to_kill() Yunfeng Ye
2019-11-05 8:57 ` David Hildenbrand
2019-11-05 9:09 ` Naoya Horiguchi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.