mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chen Gang <gang.chen@asianux.com>
To: paulmck@linux.vnet.ibm.com
Cc: josh@freedesktop.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] kernel/rcutorture.c: be sure of enough memory for result printing
Date: Fri, 08 Nov 2013 08:58:39 +0800	[thread overview]
Message-ID: <527C373F.5050009@asianux.com> (raw)
In-Reply-To: <20131107205930.GV18245@linux.vnet.ibm.com>

On 11/08/2013 04:59 AM, Paul E. McKenney wrote:
> On Thu, Nov 07, 2013 at 10:30:25AM +0800, Chen Gang wrote:
>> > If the contents is more than 4096 bytes (e.g. if have 1K cpus), current
>> > sprintf() will cause memory overflow. And this fix patch is to be sure
>> > of memory large enough.
>> > 
>> > Benefit:
>> > 
>> >  - do not truncate printing contents.
>> >  - extensible, it is large enough for printing various related contents.
>> >  - simple and clear enough for both source code readers and writers.
>> > 
>> > Shortcoming:
>> > 
>> >  - It will waste some memory:
>> > 
>> >     1 cpu now comsumes 50 - 60 bytes, and this patch provides 200 bytes.
>> >     global printing now comsumes a few KB, and this patch provide 8KB,
>> >     so for 1K cpus, it may waste 100 - 200 KB memory.
>> > 
>> >    after finish printing, it will free the related memory, quickly.
>> >    it is a test module, so wast a little memory for extensible is OK.
>> > 
>> > Related  test (Fedora16 2 CPUs, 2GB RAM x86_64)
>> > 
>> >  - as module, with/without "torture_type=srcu".
>> >  - build-in not boot runnable, with/without "torture_type=srcu".
>> >  - build-in let boot runnable, with/without "torture_type=srcu".
>> > 
>> > 
>> > Signed-off-by: Chen Gang <gang.chen@asianux.com>
> Thank you, queued for 3.14.

Thank you too.

-- 
Chen Gang

      reply	other threads:[~2013-11-08  0:56 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-08  8:32 [Suggestion] kernel/rcutorture.c: about using scnprintf() instead of sprintf() Chen Gang
2013-10-13 11:05 ` Paul E. McKenney
2013-10-14  1:41   ` Chen Gang
2013-10-14  2:22     ` Chen Gang
2013-10-14 11:24       ` Paul E. McKenney
2013-10-15  1:40         ` Chen Gang
2013-10-15  8:31           ` Paul E. McKenney
2013-10-15  9:03             ` Chen Gang
2013-10-14  8:38   ` [PATCH] kernel/rcutorture.c: use " Chen Gang
2013-10-14 11:28     ` Paul E. McKenney
2013-10-15  0:54       ` Chen Gang
2013-10-15  1:51         ` Chen Gang
2013-10-15  8:26           ` Paul E. McKenney
2013-10-15 12:32             ` Chen Gang
2013-10-15 14:47               ` Paul E. McKenney
2013-10-16  2:07                 ` Chen Gang
2013-10-17  1:06                   ` Chen Gang
2013-10-21  5:51                     ` [PATCH] kernel/rcutorture.c: be sure of enough memory for result printing Chen Gang
2013-10-21  6:18                       ` Chen Gang
2013-10-21  9:35                         ` Chen Gang
2013-10-27 14:43                           ` Chen Gang
2013-11-04  9:42                             ` Chen Gang
2013-11-06 20:38                       ` Paul E. McKenney
2013-11-07  2:30                         ` [PATCH v2] " Chen Gang
2013-11-07 20:59                           ` Paul E. McKenney
2013-11-08  0:58                             ` Chen Gang [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=527C373F.5050009@asianux.com \
    --to=gang.chen@asianux.com \
    --cc=josh@freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome