From: Manfred Spraul <manfred@colorfullife.com>
To: Steven Stewart-Gallus <sstewartgallus00@mylangara.bc.ca>,
Davidlohr Bueso <dave@stgolabs.net>
Cc: linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
"J. Bruce Fields" <bfields@redhat.com>,
Doug Ledford <dledford@redhat.com>,
linux-newbie@vger.kernel.org
Subject: Re: [PATCH 1/1] ipc/mqueue.c: Drag unneeded code out of locks
Date: Mon, 17 Nov 2014 20:08:54 +0100 [thread overview]
Message-ID: <546A47C6.4030309@colorfullife.com> (raw)
In-Reply-To: <fb59f9ad237f.5468fdbe@langara.bc.ca>
Hi Steven,
On 11/16/2014 08:40 PM, Steven Stewart-Gallus wrote:
> Finally, please don't ignore the rest of my message. Even if my patch
> isn't that good there are lots of ways to compromise and improve it
> such as adding tests, annotations and making it clearer.
I think you were already given ideas how to improve the patch:
a) split the patch.
b) create test cases so that you are able to check that the code still
behaves as it did before
Did you test the change to mqueue_create()?
c) Give each a good summary of what you want to achieve:
- readability
- coding style
- performance
- avoid a lock entirely, switch to RCU instead of spin_lock(), ...
- reduce the time a lock is held (usually only useful if the reduction
is significant - both relative and absolute).
- ...
Writing that down also helps you:
There were multiple patches that I've dropped myself - simply because I
have noticed that the patch doesn't achieve anything useful.
From your changes: The one to mqueue_read_file might make sense, it
avoids to hold the spinlock over the snprintf.
For the other changes, I don't see that they improve something, but
perhaps I have overlooked something.
Best regards,
Manfred
next prev parent reply other threads:[~2014-11-17 19:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-07 5:40 [PATCH 1/1] ipc/mqueue.c: Drag unneeded code out of locks Steven Stewart-Gallus
2014-11-12 0:21 ` Andrew Morton
2014-11-15 4:42 ` Steven Stewart-Gallus
2014-11-12 8:16 ` Davidlohr Bueso
2014-11-15 4:44 ` Steven Stewart-Gallus
2014-11-15 21:22 ` Davidlohr Bueso
2014-11-16 19:40 ` Steven Stewart-Gallus
2014-11-17 19:08 ` Manfred Spraul [this message]
2014-11-17 20:52 ` Davidlohr Bueso
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=546A47C6.4030309@colorfullife.com \
--to=manfred@colorfullife.com \
--cc=akpm@linux-foundation.org \
--cc=bfields@redhat.com \
--cc=dave@stgolabs.net \
--cc=dledford@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-newbie@vger.kernel.org \
--cc=sstewartgallus00@mylangara.bc.ca \
/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