public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Stewart-Gallus <sstewartgallus00@mylangara.bc.ca>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Manfred Spraul <manfred@colorfullife.com>,
	"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: Sun, 16 Nov 2014 19:40:46 +0000 (GMT)	[thread overview]
Message-ID: <fb59f9ad237f.5468fdbe@langara.bc.ca> (raw)
In-Reply-To: <1416086539.12597.15.camel@linux-t7sj.site>

Hello,

My intent with my patch was to make things easier to understand
because it reduces the size of critical sections to more
understandable bite sized chunks. My patch would make the purposes of
the critical sections more obvious and understandable. In making this
patch I may have made a few mistakes which we can correct.

>  For instance, adding local variables from structures passed
to a function does *not* make things more clearer:

This is not generally indicative of most of the patch. Moreover, the
local variable was introduced into a TIGHTLY restricted scope which
brings me to the next point.

> Plus you add context specific regions within the function (code
> around { }), ugly and something we've been removing!

Small context specific regions are GOOD. This is why we have functions
instead of one big ball of mud. I wouldn't be opposed to moving the {
} regions into smaller sub-functions themselves as the indentation can
get slightly annoying though. Also, this would let me put sparse
locking annotations on them.

> > It is not fair to argue that these changes are risky. 

I still hold this position.

If these changes are risky for you then the code needs improvement or
you are incompetent. I am trying to make the code easier to understand
and REDUCE risks. Maybe my patch isn't as obvious and easily
understandable as it should be. In that case, would you agree that
even if my patch isn't the best way to improve the code that it still
needs improvement?

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.

Thank you,
Steven Stewart-Gallus

  reply	other threads:[~2014-11-16 19:40 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 [this message]
2014-11-17 19:08         ` Manfred Spraul
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=fb59f9ad237f.5468fdbe@langara.bc.ca \
    --to=sstewartgallus00@mylangara.bc.ca \
    --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=manfred@colorfullife.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