diff mbox series

[1/8] sched: coredump.h: clarify the use of MMF_VM_HUGEPAGE

Message ID 20220228235741.102941-2-shy828301@gmail.com (mailing list archive)
State Superseded
Headers show
Series Make khugepaged collapse readonly FS THP more consistent | expand

Commit Message

Yang Shi Feb. 28, 2022, 11:57 p.m. UTC
MMF_VM_HUGEPAGE is set as long as the mm is available for khugepaged by
khugepaged_enter(), not only when VM_HUGEPAGE is set on vma.  Correct
the comment to avoid confusion.

Signed-off-by: Yang Shi <shy828301@gmail.com>
---
 include/linux/sched/coredump.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Miaohe Lin March 1, 2022, 8:45 a.m. UTC | #1
On 2022/3/1 7:57, Yang Shi wrote:
> MMF_VM_HUGEPAGE is set as long as the mm is available for khugepaged by
> khugepaged_enter(), not only when VM_HUGEPAGE is set on vma.  Correct
> the comment to avoid confusion.
> 
> Signed-off-by: Yang Shi <shy828301@gmail.com>
> ---
>  include/linux/sched/coredump.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/include/linux/sched/coredump.h b/include/linux/sched/coredump.h
> index 4d9e3a656875..4d0a5be28b70 100644
> --- a/include/linux/sched/coredump.h
> +++ b/include/linux/sched/coredump.h
> @@ -57,7 +57,8 @@ static inline int get_dumpable(struct mm_struct *mm)
>  #endif
>  					/* leave room for more dump flags */
>  #define MMF_VM_MERGEABLE	16	/* KSM may merge identical pages */
> -#define MMF_VM_HUGEPAGE		17	/* set when VM_HUGEPAGE is set on vma */
> +#define MMF_VM_HUGEPAGE		17	/* set when mm is available for
> +					   khugepaged */

I think this comment could be written in one line. Anyway, this patch looks good to me.
Thanks.

Reviewed-by: Miaohe Lin <linmiaohe@huawei.com>

>  /*
>   * This one-shot flag is dropped due to necessity of changing exe once again
>   * on NFS restore
>
Yang Shi March 1, 2022, 9:49 p.m. UTC | #2
On Tue, Mar 1, 2022 at 12:45 AM Miaohe Lin <linmiaohe@huawei.com> wrote:
>
> On 2022/3/1 7:57, Yang Shi wrote:
> > MMF_VM_HUGEPAGE is set as long as the mm is available for khugepaged by
> > khugepaged_enter(), not only when VM_HUGEPAGE is set on vma.  Correct
> > the comment to avoid confusion.
> >
> > Signed-off-by: Yang Shi <shy828301@gmail.com>
> > ---
> >  include/linux/sched/coredump.h | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/include/linux/sched/coredump.h b/include/linux/sched/coredump.h
> > index 4d9e3a656875..4d0a5be28b70 100644
> > --- a/include/linux/sched/coredump.h
> > +++ b/include/linux/sched/coredump.h
> > @@ -57,7 +57,8 @@ static inline int get_dumpable(struct mm_struct *mm)
> >  #endif
> >                                       /* leave room for more dump flags */
> >  #define MMF_VM_MERGEABLE     16      /* KSM may merge identical pages */
> > -#define MMF_VM_HUGEPAGE              17      /* set when VM_HUGEPAGE is set on vma */
> > +#define MMF_VM_HUGEPAGE              17      /* set when mm is available for
> > +                                        khugepaged */
>
> I think this comment could be written in one line. Anyway, this patch looks good to me.
> Thanks.

Yes, as long as we don't care about the 80 characters limit. I know
the limit was bumped to 100 by checkpatch, but I have seen 80 was
still preferred by a lot of people.

>
> Reviewed-by: Miaohe Lin <linmiaohe@huawei.com>

Thanks.

>
> >  /*
> >   * This one-shot flag is dropped due to necessity of changing exe once again
> >   * on NFS restore
> >
>
Miaohe Lin March 2, 2022, 1:39 a.m. UTC | #3
On 2022/3/2 5:49, Yang Shi wrote:
> On Tue, Mar 1, 2022 at 12:45 AM Miaohe Lin <linmiaohe@huawei.com> wrote:
>>
>> On 2022/3/1 7:57, Yang Shi wrote:
>>> MMF_VM_HUGEPAGE is set as long as the mm is available for khugepaged by
>>> khugepaged_enter(), not only when VM_HUGEPAGE is set on vma.  Correct
>>> the comment to avoid confusion.
>>>
>>> Signed-off-by: Yang Shi <shy828301@gmail.com>
>>> ---
>>>  include/linux/sched/coredump.h | 3 ++-
>>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/include/linux/sched/coredump.h b/include/linux/sched/coredump.h
>>> index 4d9e3a656875..4d0a5be28b70 100644
>>> --- a/include/linux/sched/coredump.h
>>> +++ b/include/linux/sched/coredump.h
>>> @@ -57,7 +57,8 @@ static inline int get_dumpable(struct mm_struct *mm)
>>>  #endif
>>>                                       /* leave room for more dump flags */
>>>  #define MMF_VM_MERGEABLE     16      /* KSM may merge identical pages */
>>> -#define MMF_VM_HUGEPAGE              17      /* set when VM_HUGEPAGE is set on vma */
>>> +#define MMF_VM_HUGEPAGE              17      /* set when mm is available for
>>> +                                        khugepaged */
>>
>> I think this comment could be written in one line. Anyway, this patch looks good to me.
>> Thanks.
> 
> Yes, as long as we don't care about the 80 characters limit. I know
> the limit was bumped to 100 by checkpatch, but I have seen 80 was
> still preferred by a lot of people.

I see. Many thanks for clarifying.

> 
>>
>> Reviewed-by: Miaohe Lin <linmiaohe@huawei.com>
> 
> Thanks.
> 
>>
>>>  /*
>>>   * This one-shot flag is dropped due to necessity of changing exe once again
>>>   * on NFS restore
>>>
>>
> .
>
diff mbox series

Patch

diff --git a/include/linux/sched/coredump.h b/include/linux/sched/coredump.h
index 4d9e3a656875..4d0a5be28b70 100644
--- a/include/linux/sched/coredump.h
+++ b/include/linux/sched/coredump.h
@@ -57,7 +57,8 @@  static inline int get_dumpable(struct mm_struct *mm)
 #endif
 					/* leave room for more dump flags */
 #define MMF_VM_MERGEABLE	16	/* KSM may merge identical pages */
-#define MMF_VM_HUGEPAGE		17	/* set when VM_HUGEPAGE is set on vma */
+#define MMF_VM_HUGEPAGE		17	/* set when mm is available for
+					   khugepaged */
 /*
  * This one-shot flag is dropped due to necessity of changing exe once again
  * on NFS restore