From: Alex Thorlton <athorlton@sgi.com>
To: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Rik van Riel <riel@redhat.com>,
Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
Oleg Nesterov <oleg@redhat.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Andy Lutomirski <luto@amacapital.net>,
Al Viro <viro@zeniv.linux.org.uk>,
Kees Cook <keescook@chromium.org>,
Andrea Arcangeli <aarcange@redhat.com>
Subject: Re: [RFC PATCHv2 1/2] Add mm flag to control THP
Date: Mon, 20 Jan 2014 11:26:09 -0600 [thread overview]
Message-ID: <20140120172609.GC18196@sgi.com> (raw)
In-Reply-To: <20140118234134.GA10970@node.dhcp.inet.fi>
On Sun, Jan 19, 2014 at 01:41:34AM +0200, Kirill A. Shutemov wrote:
> On Thu, Jan 16, 2014 at 03:01:43PM -0600, Alex Thorlton wrote:
> > diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
> > index 91672e2..475f59f 100644
> > --- a/include/linux/huge_mm.h
> > +++ b/include/linux/huge_mm.h
> > @@ -1,6 +1,8 @@
> > #ifndef _LINUX_HUGE_MM_H
> > #define _LINUX_HUGE_MM_H
> >
> > +#include <linux/sched.h>
> > +
>
> Hm, now <linux/mm.h> depends on <linux/sched.h>. It doesn't look as a good
> idea.
>
> Why do we have MMF_* defines in <linux/sched.h>?
> Wouldn't it more appropriate to put them in <linux/mm_types.h>?
I'm not sure about that. I just placed my definitions where everything
else was defined. It might make more sense to have these in
mm_types.h, though that's a separate effort. For now, I don't think I
have a choice but to include sched.h here, but it does seem to make
sense that I should be able to see the defined mm flags from huge_mm.h,
without having to include sched.h. I'm sure there are other places where
this applies as well.
> > extern int do_huge_pmd_anonymous_page(struct mm_struct *mm,
> > struct vm_area_struct *vma,
> > unsigned long address, pmd_t *pmd,
> > @@ -74,7 +76,8 @@ extern bool is_vma_temporary_stack(struct vm_area_struct *vma);
> > (1<<TRANSPARENT_HUGEPAGE_REQ_MADV_FLAG) && \
> > ((__vma)->vm_flags & VM_HUGEPAGE))) && \
> > !((__vma)->vm_flags & VM_NOHUGEPAGE) && \
> > - !is_vma_temporary_stack(__vma))
> > + !is_vma_temporary_stack(__vma) && \
> > + !test_bit(MMF_THP_DISABLE, &(__vma)->vm_mm->flags))
> > #define transparent_hugepage_defrag(__vma) \
> > ((transparent_hugepage_flags & \
> > (1<<TRANSPARENT_HUGEPAGE_DEFRAG_FLAG)) || \
> > @@ -227,7 +230,6 @@ static inline int do_huge_pmd_numa_page(struct mm_struct *mm, struct vm_area_str
> > {
> > return 0;
> > }
> > -
> > #endif /* CONFIG_TRANSPARENT_HUGEPAGE */
> >
> > #endif /* _LINUX_HUGE_MM_H */
>
> Why?
Are you asking about the line I removed there? That was probably an
accident. I'll fix that
- Alex
prev parent reply other threads:[~2014-01-20 17:25 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-16 21:01 [RFC PATCHv2 1/2] Add mm flag to control THP Alex Thorlton
2014-01-16 21:01 ` [RFC PATCHv2 2/2] Change khugepaged to respect MMF_THP_DISABLE flag Alex Thorlton
2014-01-17 20:34 ` Oleg Nesterov
2014-01-17 22:58 ` Alex Thorlton
2014-01-18 23:49 ` Kirill A. Shutemov
2014-01-20 19:58 ` Alex Thorlton
2014-01-20 20:15 ` Oleg Nesterov
2014-01-20 20:41 ` Alex Thorlton
2014-01-22 17:45 ` [PATCH 0/2] mm->def_flags cleanups (Was: Change khugepaged to respect MMF_THP_DISABLE flag) Oleg Nesterov
2014-01-22 17:46 ` [PATCH 1/2] exec: kill the unnecessary mm->def_flags setting in load_elf_binary() Oleg Nesterov
2014-01-22 17:46 ` [PATCH 2/2] mm: thp: kill the bogus ->def_flags check in hugepage_madvise() Oleg Nesterov
2014-01-22 20:16 ` Hugh Dickins
2014-01-23 16:43 ` Oleg Nesterov
2014-01-24 14:19 ` Gerald Schaefer
2014-01-22 18:11 ` [PATCH 0/2] mm->def_flags cleanups (Was: Change khugepaged to respect MMF_THP_DISABLE flag) Oleg Nesterov
2014-01-22 18:40 ` Alex Thorlton
2014-01-22 19:25 ` Oleg Nesterov
2014-01-22 19:43 ` Oleg Nesterov
2014-01-22 20:02 ` Alex Thorlton
2014-01-23 16:47 ` Oleg Nesterov
2014-01-17 19:54 ` [RFC PATCHv2 1/2] Add mm flag to control THP Andy Lutomirski
2014-01-17 22:54 ` Alex Thorlton
2014-01-17 20:09 ` Oleg Nesterov
2014-01-17 22:52 ` Alex Thorlton
2014-01-18 23:41 ` Kirill A. Shutemov
2014-01-20 17:26 ` Alex Thorlton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140120172609.GC18196@sgi.com \
--to=athorlton@sgi.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=ebiederm@xmission.com \
--cc=keescook@chromium.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@redhat.com \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=riel@redhat.com \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.