All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: dm-devel@redhat.com
Subject: Re: edits for r16 of shared snapshot patches [was: Re: userspace patches for shared snapshots]
Date: Wed, 10 Mar 2010 15:45:14 -0500	[thread overview]
Message-ID: <20100310204513.GA29283@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1003090332350.21412@hs20-bc2-1.build.redhat.com>

On Tue, Mar 09 2010 at  3:41am -0500,
Mikulas Patocka <mpatocka@redhat.com> wrote:

> > You can see the edits here:
> > http://people.redhat.com/msnitzer/patches/multisnap/kernel/2.6.33/r16a/r16_edits.patch
> > 
> > Boils down to:
> > * use __func__ rather than hardcoding the function name
> >   - this fixed ~3 inconsistencies (incorrect function names) and should
> >     help if/when we do any function renaming in later phases of review
> 
> It consumes one more stack word for every function where this conversion 
> was performed ... I don't know if it's worth it ... likely it doesn't 
> matter.
> 
> The problem here is that GCC is preallocating the space for all outgoing 
> arguments in the function prologue, so if the function has something like 
> this
> if (bug_happened) {
> 	printk("%s: bug happened: %d %d %d %d %d %d %d %d", __func__, a, 
> b, c, d, e, f, g, h, i);
> }
> the whole function always wastes 10 stack words, even if the bug doesn't 
> happen :(
> 
> But that one word because of __func__ maybe doesn't matter (there are much 
> more wasted already in these printks). Or do you think that it's better to 
> not do this __func__ conversion?

I think the use of __func__ reduces the maintenance cost of keeping the
printk updated if the code were to change.  Like I said, I found ~3
remaining function name inconsistencies.  Plus I had already fixed a few
others in my previous large whitespace patch.

Anyway, I understand your point on the extra word associated with using
__func__ but feel using it is more helpful.

Mike

  reply	other threads:[~2010-03-10 20:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-10 23:59 userspace patches for shared snapshots Mikulas Patocka
2010-02-25 22:13 ` Mike Snitzer
2010-02-26  4:52   ` Mikulas Patocka
2010-02-26 21:17     ` Mike Snitzer
2010-03-03 22:37       ` Mike Snitzer
2010-03-04 10:11         ` Mikulas Patocka
2010-03-04 13:22           ` Mike Snitzer
2010-03-05 17:47             ` edits for r16 of shared snapshot patches [was: Re: userspace patches for shared snapshots] Mike Snitzer
2010-03-05 17:47               ` Mike Snitzer
2010-03-09  8:41               ` Mikulas Patocka
2010-03-09  8:41                 ` Mikulas Patocka
2010-03-10 20:45                 ` Mike Snitzer [this message]
2010-03-09  3:18             ` userspace patches for shared snapshots Mikulas Patocka
2010-03-09  3:38               ` Alasdair G Kergon

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=20100310204513.GA29283@redhat.com \
    --to=snitzer@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=mpatocka@redhat.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.