linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fix incorrect compound page flags store
@ 2020-09-02 11:24 yaoaili [么爱利]
  2020-09-02 11:35 ` Matthew Wilcox
  0 siblings, 1 reply; 4+ messages in thread
From: yaoaili [么爱利] @ 2020-09-02 11:24 UTC (permalink / raw)
  To: naoya.horiguchi; +Cc: linux-mm, YANGFENG1 [杨峰]

[-- Attachment #1: Type: text/plain, Size: 661 bytes --]

PageHuge(p) branch will never be true,but for compound page we need to set page_flags to correct value.

diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index f1aa6433f404..e6995976b11d 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -1382,7 +1382,7 @@ int memory_failure(unsigned long pfn, int flags)
         * page_remove_rmap() in try_to_unmap_one(). So to determine page status
         * correctly, we save a copy of the page flags at this time.
         */
-       if (PageHuge(p))
+       if (PageCompound(p))
                page_flags = hpage->flags;
        else
                page_flags = p->flags;
--
2.25.1

[-- Attachment #2: Type: text/html, Size: 3865 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] fix incorrect compound page flags store
  2020-09-02 11:24 [PATCH] fix incorrect compound page flags store yaoaili [么爱利]
@ 2020-09-02 11:35 ` Matthew Wilcox
  2020-09-02 11:46   ` 答复: " yaoaili [么爱利]
  0 siblings, 1 reply; 4+ messages in thread
From: Matthew Wilcox @ 2020-09-02 11:35 UTC (permalink / raw)
  To: yaoaili [么爱利]
  Cc: naoya.horiguchi, linux-mm, YANGFENG1 [杨峰]

On Wed, Sep 02, 2020 at 11:24:59AM +0000, yaoaili [么爱利] wrote:
> PageHuge(p) branch will never be true,but for compound page we need to set page_flags to correct value.

You're missing a Signed-off-by line.

Your analysis is correct; PageHuge was tested for a few dozen lines
higher, and we ran off to a different function.

Ad far as I understand this function, this looks right to me.

Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>

> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> index f1aa6433f404..e6995976b11d 100644
> --- a/mm/memory-failure.c
> +++ b/mm/memory-failure.c
> @@ -1382,7 +1382,7 @@ int memory_failure(unsigned long pfn, int flags)
>          * page_remove_rmap() in try_to_unmap_one(). So to determine page status
>          * correctly, we save a copy of the page flags at this time.
>          */
> -       if (PageHuge(p))
> +       if (PageCompound(p))
>                 page_flags = hpage->flags;
>         else
>                 page_flags = p->flags;
> --
> 2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* 答复: [PATCH] fix incorrect compound page flags store
  2020-09-02 11:35 ` Matthew Wilcox
@ 2020-09-02 11:46   ` yaoaili [么爱利]
  2020-09-04  2:26     ` HORIGUCHI NAOYA(堀口 直也)
  0 siblings, 1 reply; 4+ messages in thread
From: yaoaili [么爱利] @ 2020-09-02 11:46 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: naoya.horiguchi, linux-mm, YANGFENG1 [杨峰]

Signed-off-by: Yao Aili< yaoaili@kingsoft.com>
Signed-off-by: Yang Feng < yangfeng1@kingsoft.com>

-----邮件原件-----
发件人: Matthew Wilcox [mailto:willy@infradead.org] 
发送时间: 2020年9月2日 19:35
收件人: yaoaili [么爱利] <yaoaili@kingsoft.com>
抄送: naoya.horiguchi@nec.com; linux-mm@kvack.org; YANGFENG1 [杨峰] <YANGFENG1@kingsoft.com>
主题: Re: [PATCH] fix incorrect compound page flags store

On Wed, Sep 02, 2020 at 11:24:59AM +0000, yaoaili [么爱利] wrote:
> PageHuge(p) branch will never be true,but for compound page we need to set page_flags to correct value.
Signed-off-by: Yao aili< yaoaili@kingsoft.com>
Signed-off-by: Yang feng < yangfeng1@kingsoft.com>

You're missing a Signed-off-by line.

Your analysis is correct; PageHuge was tested for a few dozen lines higher, and we ran off to a different function.

Ad far as I understand this function, this looks right to me.

Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>

> diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 
> f1aa6433f404..e6995976b11d 100644
> --- a/mm/memory-failure.c
> +++ b/mm/memory-failure.c
> @@ -1382,7 +1382,7 @@ int memory_failure(unsigned long pfn, int flags)
>          * page_remove_rmap() in try_to_unmap_one(). So to determine page status
>          * correctly, we save a copy of the page flags at this time.
>          */
> -       if (PageHuge(p))
> +       if (PageCompound(p))
>                 page_flags = hpage->flags;
>         else
>                 page_flags = p->flags;
> --
> 2.25.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 答复: [PATCH] fix incorrect compound page flags store
  2020-09-02 11:46   ` 答复: " yaoaili [么爱利]
@ 2020-09-04  2:26     ` HORIGUCHI NAOYA(堀口 直也)
  0 siblings, 0 replies; 4+ messages in thread
From: HORIGUCHI NAOYA(堀口 直也) @ 2020-09-04  2:26 UTC (permalink / raw)
  To: yaoaili [么爱利]
  Cc: Matthew Wilcox, linux-mm, YANGFENG1 [杨峰]

Hi,

Thank you for sending a patch.  The change itself is fine to me, but you
might need adjust and resubmit it in accordance with the guideline.

https://www.kernel.org/doc/html/latest/process/submitting-patches.html

# Signed-off-by line should be included in the patch description,
# and you need send a patch in plain text mode.

Thanks,
Naoya Horiguchi

On Wed, Sep 02, 2020 at 11:46:14AM +0000, yaoaili [么爱利] wrote:
> Signed-off-by: Yao Aili< yaoaili@kingsoft.com>
> Signed-off-by: Yang Feng < yangfeng1@kingsoft.com>
> 
> -----邮件原件-----
> 发件人: Matthew Wilcox [mailto:willy@infradead.org] 
> 发送时间: 2020年9月2日 19:35
> 收件人: yaoaili [么爱利] <yaoaili@kingsoft.com>
> 抄送: naoya.horiguchi@nec.com; linux-mm@kvack.org; YANGFENG1 [杨峰] <YANGFENG1@kingsoft.com>
> 主题: Re: [PATCH] fix incorrect compound page flags store
> 
> On Wed, Sep 02, 2020 at 11:24:59AM +0000, yaoaili [么爱利] wrote:
> > PageHuge(p) branch will never be true,but for compound page we need to set page_flags to correct value.
> Signed-off-by: Yao aili< yaoaili@kingsoft.com>
> Signed-off-by: Yang feng < yangfeng1@kingsoft.com>
> 
> You're missing a Signed-off-by line.
> 
> Your analysis is correct; PageHuge was tested for a few dozen lines higher, and we ran off to a different function.
> 
> Ad far as I understand this function, this looks right to me.
> 
> Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> 
> > diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 
> > f1aa6433f404..e6995976b11d 100644
> > --- a/mm/memory-failure.c
> > +++ b/mm/memory-failure.c
> > @@ -1382,7 +1382,7 @@ int memory_failure(unsigned long pfn, int flags)
> >          * page_remove_rmap() in try_to_unmap_one(). So to determine page status
> >          * correctly, we save a copy of the page flags at this time.
> >          */
> > -       if (PageHuge(p))
> > +       if (PageCompound(p))
> >                 page_flags = hpage->flags;
> >         else
> >                 page_flags = p->flags;
> > --
> > 2.25.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-09-04  2:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-02 11:24 [PATCH] fix incorrect compound page flags store yaoaili [么爱利]
2020-09-02 11:35 ` Matthew Wilcox
2020-09-02 11:46   ` 答复: " yaoaili [么爱利]
2020-09-04  2:26     ` HORIGUCHI NAOYA(堀口 直也)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).