From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] small speedup in 'nla_strlcpy' in file '\lib\nlattr.c'
Date: Tue, 07 Feb 2012 06:54:29 +0000 [thread overview]
Message-ID: <20120207065429.GA3554@mwanda> (raw)
In-Reply-To: <4F3041C3.70607@wanadoo.fr>
[-- Attachment #1: Type: text/plain, Size: 1339 bytes --]
On Mon, Feb 06, 2012 at 10:10:27PM +0100, Christophe JAILLET wrote:
> Hi,
>
> I don't know if it worses a patch, but function 'nla_strlcpy' in
> file '\lib\nlattr.c' could be improved a bit.
> There is no need to memset(0) the whole buffer. Only the end of it
> has to be cleared.
>
> Usually, 'dstsize' is small (most of the time IFNAMSIZ = 16 bytes),
> so the gain should be real small, if noticeable.
>
> I'm not sure of who to cc: the mail. I've just added Alexey
> Kuznetsov which is one of the author of the modified file and still
> in the MAINTAINERS list.
>
So if we're not going to notice the speedup, then it's not worth it.
Mostly this is only used when people type "ifup eth0" and so a
speedup wouldn't even matter. It is used in taskstats so maybe if
you did a benchmark and showed that it was faster then that would
be a compelling argument. But every patch needs to have a reason to
apply it, and "maybe this helps but maybe not" is not good enough
salesmanship, you need actual data.
Use the ./scripts/get_maintainer.pl to find which places to send
this.
Also your email client mangled the patch so it doesn't apply. Read
Documentation/email-clients.txt. Send the patch to yourself first
and verify that you can do a "cat raw_email.txt | patch -p1".
regards,
dan carpenter
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
prev parent reply other threads:[~2012-02-07 6:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-06 21:10 [PATCH] small speedup in 'nla_strlcpy' in file '\lib\nlattr.c' Christophe JAILLET
2012-02-07 6:54 ` Dan Carpenter [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=20120207065429.GA3554@mwanda \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@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.