Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1741290 > unrolled thread
| Started by | Ingo Molnar <mingo@kernel.org> |
|---|---|
| First post | 2017-09-28 10:40 +0200 |
| Last post | 2017-09-28 15:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCHv7 11/19] x86/mm: Make STACK_TOP_MAX dynamic Ingo Molnar <mingo@kernel.org> - 2017-09-28 10:40 +0200
Re: [PATCHv7 11/19] x86/mm: Make STACK_TOP_MAX dynamic "Kirill A. Shutemov" <kirill@shutemov.name> - 2017-09-28 15:20 +0200
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Date | 2017-09-28 10:40 +0200 |
| Subject | Re: [PATCHv7 11/19] x86/mm: Make STACK_TOP_MAX dynamic |
| Message-ID | <uuCwr-6Fg-17@gated-at.bofh.it> |
* Kirill A. Shutemov <kirill.shutemov@linux.intel.com> wrote: > For boot-time switching between paging modes, we need to be able to > change STACK_TOP_MAX at runtime. > > The change is trivial and it doesn't affect kernel image size. > > Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> > --- > arch/x86/include/asm/processor.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h > index 3fa26a61eabc..fa9300ccce1b 100644 > --- a/arch/x86/include/asm/processor.h > +++ b/arch/x86/include/asm/processor.h > @@ -871,7 +871,7 @@ static inline void spin_lock_prefetch(const void *x) > IA32_PAGE_OFFSET : TASK_SIZE_MAX) > > #define STACK_TOP TASK_SIZE_LOW > -#define STACK_TOP_MAX TASK_SIZE_MAX > +#define STACK_TOP_MAX (pgtable_l5_enabled ? TASK_SIZE_MAX : DEFAULT_MAP_WINDOW) While it's only used once in fs/exec.c, why doesn't it affect kernel image size? Thanks, Ingo
[toc] | [next] | [standalone]
| From | "Kirill A. Shutemov" <kirill@shutemov.name> |
|---|---|
| Date | 2017-09-28 15:20 +0200 |
| Message-ID | <uuGTp-10S-49@gated-at.bofh.it> |
| In reply to | #1741290 |
On Thu, Sep 28, 2017 at 10:29:55AM +0200, Ingo Molnar wrote: > > * Kirill A. Shutemov <kirill.shutemov@linux.intel.com> wrote: > > > For boot-time switching between paging modes, we need to be able to > > change STACK_TOP_MAX at runtime. > > > > The change is trivial and it doesn't affect kernel image size. > > > > Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> > > --- > > arch/x86/include/asm/processor.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h > > index 3fa26a61eabc..fa9300ccce1b 100644 > > --- a/arch/x86/include/asm/processor.h > > +++ b/arch/x86/include/asm/processor.h > > @@ -871,7 +871,7 @@ static inline void spin_lock_prefetch(const void *x) > > IA32_PAGE_OFFSET : TASK_SIZE_MAX) > > > > #define STACK_TOP TASK_SIZE_LOW > > -#define STACK_TOP_MAX TASK_SIZE_MAX > > +#define STACK_TOP_MAX (pgtable_l5_enabled ? TASK_SIZE_MAX : DEFAULT_MAP_WINDOW) > > While it's only used once in fs/exec.c, why doesn't it affect kernel image size? Oh. After closer look the patch is redundant. The STACK_TOP_MAX is already dynamic due to dynamic TASK_SIZE_MAX, so gcc generates exactly the same code before and after the patch. I'll drop it. -- Kirill A. Shutemov
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web