All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vlad Yasevich <vladislav.yasevich@hp.com>
To: "Ilpo Järvinen" <ilpo.jarvinen@helsinki.fi>
Cc: Netdev <netdev@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	David Miller <davem@davemloft.net>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: Re: [RFC PATCH 7/8] [SCTP]: uninline sctp_add_cmd_sf
Date: Thu, 21 Feb 2008 10:27:46 -0500	[thread overview]
Message-ID: <47BD9872.9050308@hp.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0802210020350.17063@kivilampi-30.cs.helsinki.fi>

Ilpo Järvinen wrote:
> On Wed, 20 Feb 2008, Vlad Yasevich wrote:
> 
>> Ilpo Järvinen wrote:
>>> I added inline to sctp_add_cmd and appropriate comment there to
>>> avoid adding another call into the call chain. This works at least
>>> with "gcc (GCC) 4.1.2 20070626 (Red Hat 4.1.2-13)". Alternatively,
>>> __sctp_add_cmd could be introduced to .h.
>>>
>> My only concern was performance regressions, but it looks like it
>> doesn't effect anything from the few quick runs I've made.
> 
> There was one call made anyway, it's a bit hard to see how it would hurt 
> to push that BUG() deeper down (in fact, this is one of the easiest case 
> in this respect, many other cases elsewhere that need uninlining don't 
> currently make any calls with inlines).
> 
>> Since we are putting sctp_add_cmd_sf() on the call stack, we might
>> as well get rid of sctp_add_cmd() and reduce it a bit more.
> 
> IMHO it is definately better solution for archiving the size reduction,
> I just didn't know before that the only sctp_add_cmd call could be 
> converted.

That one was a really silly one.  The chance of not calling BUG() in
that one case was so small, that it didn't really make any sense from
the code robustness side.

> 
> [...snip...]
>> diff --git a/net/sctp/command.c b/net/sctp/command.c
>> index bb97733..3a06513 100644
>> --- a/net/sctp/command.c
>> +++ b/net/sctp/command.c
>> @@ -51,19 +51,16 @@ int sctp_init_cmd_seq(sctp_cmd_seq_t *seq)
>>  
>>  /* Add a command to a sctp_cmd_seq_t.
>>   * Return 0 if the command sequence is full.
>> + *
>> + * Inline here is not a mistake, this way sctp_add_cmd_sf doesn't need extra
>> + * calls, size penalty is of insignificant magnitude here
> 
> This won't be a necessary note anymore. :-)
> 
> [...snip...]
> 

Yeah.  If you are going to resubmit, feel free to put my Signed-off-by line.

-vlad

  reply	other threads:[~2008-02-21 15:27 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-20 13:47 [RFC PATCH 0/8]: uninline & uninline Ilpo Järvinen
2008-02-20 13:47 ` [RFC PATCH 1/8] [NET]: uninline skb_put, de-bloats a lot Ilpo Järvinen
2008-02-20 13:47   ` [RFC PATCH 2/8] [NET]: uninline skb_pull, " Ilpo Järvinen
2008-02-20 13:47     ` [RFC PATCH 3/8] [NET]: uninline dev_alloc_skb, " Ilpo Järvinen
2008-02-20 13:47       ` [RFC PATCH 4/8] [NET]: uninline skb_push, " Ilpo Järvinen
2008-02-20 13:47         ` [RFC PATCH 5/8] [NET]: uninline dst_release Ilpo Järvinen
2008-02-20 13:47           ` [RFC PATCH 6/8] [NET]: uninline skb_trim, de-bloats Ilpo Järvinen
2008-02-20 13:47             ` [RFC PATCH 7/8] [SCTP]: uninline sctp_add_cmd_sf Ilpo Järvinen
2008-02-20 13:47               ` [RFC PATCH 8/8] Jhash in too big for inlining, move under lib/ Ilpo Järvinen
2008-02-23  8:02                 ` Andrew Morton
2008-02-23 10:05                   ` Ilpo Järvinen
2008-02-23 18:21                     ` Andrew Morton
2008-02-23 13:06                   ` Andi Kleen
2008-02-20 22:16               ` [RFC PATCH 7/8] [SCTP]: uninline sctp_add_cmd_sf Vlad Yasevich
2008-02-20 22:34                 ` Ilpo Järvinen
2008-02-21 15:27                   ` Vlad Yasevich [this message]
2008-02-20 16:19       ` [RFC PATCH 3/8] [NET]: uninline dev_alloc_skb, de-bloats a lot Jan Engelhardt
2008-02-20 16:27         ` Patrick McHardy
2008-02-20 16:30           ` Jan Engelhardt
2008-02-20 22:18             ` Ilpo Järvinen
2008-03-12 15:27               ` Ilpo Järvinen
2008-02-20 13:54   ` [RFC PATCH 1/8] [NET]: uninline skb_put, " Patrick McHardy
2008-02-20 13:57   ` Eric Dumazet
2008-02-23  8:02 ` [RFC PATCH 0/8]: uninline & uninline Andrew Morton
2008-02-23 10:11   ` Ilpo Järvinen
2008-02-23 13:15   ` Andi Kleen
2008-02-23 18:06     ` Ilpo Järvinen
2008-02-23 18:55     ` Andrew Morton
2008-02-23 19:58       ` Hua Zhong
2008-02-23 21:02         ` Andi Kleen
2008-02-27 19:08       ` profile-likely patch (was " Valdis.Kletnieks

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=47BD9872.9050308@hp.com \
    --to=vladislav.yasevich@hp.com \
    --cc=acme@redhat.com \
    --cc=davem@davemloft.net \
    --cc=ilpo.jarvinen@helsinki.fi \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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.