All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eial Czerwacki <eial@scalemp.com>
To: linux-kernel@vger.kernel.org
Cc: Shai Fultheim <shai@scalemp.com>, Oren Twaig <oren@scalemp.com>
Subject: Re: [PATCH] percpu/module resevation: change resevation size iff X86_VSMP is set
Date: Wed, 30 Jan 2019 12:33:32 +0200	[thread overview]
Message-ID: <902b2b1d-e6bd-bded-dc72-ea792f807d18@scalemp.com> (raw)
In-Reply-To: <1548071251-1849-1-git-send-email-eial@scalemp.com>

Greetings,

On 1/21/19 1:47 PM, Eial Czerwacki wrote:
> as reported in bug #201339 (https://bugzilla.kernel.org/show_bug.cgi?id=201339)
> by enabling X86_VSMP, INTERNODE_CACHE_BYTES's definition differs from the default one
> causing the struct size to exceed the size ok 8KB.
> 
> in order to avoid such issue, increse PERCPU_MODULE_RESERVE to 64KB if CONFIG_X86_VSMP is set.
> 
> the value was caculated on linux 4.20.3, make allmodconfig all and the following oneliner:
> for f in `find -name *.ko`; do echo $f; readelf -S $f  |grep perc; done |grep data..percpu -B 1 |grep ko |while read r; do echo -n "$r: "; objdump --syms --section=.data..percpu $r|grep data |sort -n  |awk '{c++; d=strtonum("0x" $1) + strtonum("0x" $5); if (m < d) m = d;} END {printf("%d vars-> last addr 0x%x ( %d )\n", c, m, m)}' ; done |column -t |sort -k 8 -n | awk '{print $8}'| paste -sd+ | bc
> 
> Signed-off-by: Eial Czerwacki <eial@scalemp.com>
> Signed-off-by: Shai Fultheim <shai@scalemp.com>
> Signed-off-by: Oren Twaig <oren@scalemp.com>
> ---
>  include/linux/percpu.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/include/linux/percpu.h b/include/linux/percpu.h
> index 70b7123..6b79693 100644
> --- a/include/linux/percpu.h
> +++ b/include/linux/percpu.h
> @@ -14,7 +14,11 @@
>  
>  /* enough to cover all DEFINE_PER_CPUs in modules */
>  #ifdef CONFIG_MODULES
> +#ifdef X86_VSMP
> +#define PERCPU_MODULE_RESERVE		(1 << 16)
> +#else
>  #define PERCPU_MODULE_RESERVE		(8 << 10)
> +#endif
>  #else
>  #define PERCPU_MODULE_RESERVE		0
>  #endif
> 
is it possible to push this patch to mainline?
it seems like no objections/comment regarding it exists.
we'd like to fix the bug mentioned above.

  reply	other threads:[~2019-01-30 10:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-21 11:47 [PATCH] percpu/module resevation: change resevation size iff X86_VSMP is set Eial Czerwacki
2019-01-30 10:33 ` Eial Czerwacki [this message]
2019-03-01 18:30 ` Barret Rhoden
2019-03-01 20:34   ` Dennis Zhou
2019-03-01 21:27     ` Barret Rhoden
2019-03-01 21:54       ` Christopher Lameter
2019-03-13 19:40         ` Barret Rhoden
2019-03-13 20:26           ` Tejun Heo
2019-03-13 21:22             ` Paul E. McKenney
2019-03-13 21:29               ` Tejun Heo
2019-03-13 23:11                 ` Paul E. McKenney
2019-03-14 17:36                   ` Tejun Heo
2019-03-14 22:19                     ` Paul E. McKenney
2019-03-18  8:18                       ` Eial Czerwacki
2019-03-18 14:27                         ` Paul E. McKenney
2019-04-04 20:53           ` Christopher Lameter
2019-03-04  7:42   ` Eial Czerwacki

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=902b2b1d-e6bd-bded-dc72-ea792f807d18@scalemp.com \
    --to=eial@scalemp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oren@scalemp.com \
    --cc=shai@scalemp.com \
    /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.