mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: ltuikov@yahoo.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched.h: increment TASK_COMM_LEN to 20 bytes
Date: Fri, 30 Jun 2006 18:19:15 -0700	[thread overview]
Message-ID: <20060630181915.638166c2.akpm@osdl.org> (raw)
In-Reply-To: <20060701010606.4694.qmail@web31809.mail.mud.yahoo.com>

Luben Tuikov <ltuikov@yahoo.com> wrote:
>
> It is 4 byte aligned anyway.

That's a 64-bitism.  And 32-bit machines are more space-sensitive.

>  This way we can use
> up to 19+1 chars.
> 
> Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
> ---
>  include/linux/sched.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/include/linux/sched.h b/include/linux/sched.h
> index 18f12cb..3fc11bc 100644
> --- a/include/linux/sched.h
> +++ b/include/linux/sched.h
> @@ -154,7 +154,7 @@ #define set_current_state(state_value)		
>  	set_mb(current->state, (state_value))
>  
>  /* Task command name length */
> -#define TASK_COMM_LEN 16
> +#define TASK_COMM_LEN 20

So this is basically "increase size of comm[] by 4 bytes, happens to be
zero-cost on 64-bit machines".

We do occasionally hit task_struct.comm[] truncation, when people use
"too-long-a-name%d" for their kernel thread names.  But we seem to manage.


  reply	other threads:[~2006-07-01  1:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-01  1:06 Luben Tuikov
2006-07-01  1:19 ` Andrew Morton [this message]
2006-07-01  1:26   ` Luben Tuikov
2006-07-01  1:37     ` Andrew Morton
2006-07-01  2:48       ` Luben Tuikov
2006-07-01  4:46       ` Jeff Garzik
2006-07-01  4:53         ` Andrew Morton
2006-07-07 17:00           ` Luben Tuikov
2006-07-07 17:10             ` Jeff Garzik
2006-07-09  0:48               ` Luben Tuikov
2006-07-01  9:01       ` Jan Engelhardt
2006-07-03 12:07   ` Jan Engelhardt
  -- strict thread matches above, loose matches on Subject: below --
2006-06-24  2:27 Albert Cahalan
2006-06-23 16:49 Luben Tuikov

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=20060630181915.638166c2.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ltuikov@yahoo.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