public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Chen Gang <gang.chen@asianux.com>
Cc: mingo@kernel.org, laijs@cn.fujitsu.com, dipankar@in.ibm.com,
	akpm@linux-foundation.org, mathieu.desnoyers@efficios.com,
	josh@joshtriplett.org, niv@us.ibm.com, tglx@linutronix.de,
	peterz@infradead.org, rostedt@goodmis.org, dhowells@redhat.com,
	edumazet@google.com, darren@dvhart.com, fweisbec@gmail.com,
	sbw@mit.edu,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH tip/core/rcu 08/11] rcu: Micro-optimize rcu_cpu_has_callbacks()
Date: Sun, 29 Sep 2013 13:23:42 -0700	[thread overview]
Message-ID: <20130929202342.GE19582@linux.vnet.ibm.com> (raw)
In-Reply-To: <5247AB94.4080407@asianux.com>

On Sun, Sep 29, 2013 at 12:24:52PM +0800, Chen Gang wrote:
> On 09/27/2013 10:29 AM, Chen Gang wrote:
> > On 09/27/2013 02:33 AM, Paul E. McKenney wrote:
> >> On Thu, Sep 26, 2013 at 10:57:39AM +0800, Chen Gang wrote:
> >>> On 09/26/2013 04:16 AM, Paul E. McKenney wrote:
> >>>> On Wed, Sep 25, 2013 at 10:55:30AM +0800, Chen Gang wrote:
> >>>>>
> >>>>> Thank you for your whole work, firstly  :-).
> >>>>>
> >>>>> And your suggestion about testing (in our discussion) is also valuable
> >>>>> to me.
> >>>>>
> >>>>> I need start LTP in q4. After referenced your suggestion, my first step
> >>>>> for using/learning LTP is not mainly for finding kernel issues, but for
> >>>>> testing kernel (to improve my kernel testing efficiency).
> >>>>>
> >>>>> When I want to find issues by reading code, I will consider about LTP
> >>>>> too (I will try to find issues which can be tested by LTP).
> >>>>
> >>>> Doing more testing will be good!  You will probably need more tests
> >>>> than just LTP, but you must of course start somewhere.
> >>>
> >>> Give more testing is good, but also mean more time resources cost. If
> >>> spend the 'cost', also need get additional 'contributions' (not only
> >>> prove an issue), or the 'efficiency' can not be 'acceptable'.
> >>>
> >>> When "I need more tests than just LTP", firstly I need perform this
> >>> test, and then, also try to send "test case" to LTP (I guess, these
> >>> kinds of mails are welcomed by LTP).
> >>>
> >>> And LTP is also a way to find kernel issues, although I will not mainly
> >>> depend on it now (but maybe in future), it is better to familiar with it
> >>> step by step.
> >>>
> >>> LTP (Linux Test Project) is one of main kernel mad user at downstream.
> >>> Tool chain (GCC/Binutils) is one of kernel main mad tools at upstream.
> >>> If we face to the whole kernel, suggest to use them. ;-)
> >>
> >> Yep, starting with just LTP is OK.  But if by this time next year you
> >> really should be using more than just LTP.
> >>
> 
> What I have done is trying to fully use other members contributions, not trying to instead of them.
> 
> 
> And the reason why I want/try to 'open' my 'ideas' to public:
> 
>   get more suggestions, and completions from other members.
> 
>   share my ideas, it can let other members provide more contributions (e.g. I am glad, if find other members also try 'allmodconfig' on all architectures).
> 
>   If some members replicate me, I will save my current time resources and devote them to another things (which also based on other members contributions).
> 
> 
> In my opinion:
> 
>   "Open and Share" are both important and urgent to everyone, although it may not be noticed directly. Like "Air and Water" which God have blessed to everyone.

In a general sense, of course.

In many specific cases, effective sharing can require quite a bit of
preparation.  For but one example, in Dipankar's and my case, it took
about two years of work (mostly Dipankar's work) to get the initial
implementation of RCU accepted into the Linux kernel.

In your case, you can invest an average of three days per accepted
patch if you are to achieve your goal of ten patches accepted per month
(if I remember correctly).  Of course, not every patch will be accepted,
which reduces your per-patch time.  For example, if 50% of your patches
are accepted, you can invest an average of about 1.5 days per patch.

Of course, investing in learning about test frameworks or specific
kernel subsystems further reduces your time available per patch.

But if you don't invest in your learning, you will be limited in what
you can effectively contribute.  This might be OK, for all I know.
After all, in the 15 million lines of Linux kernel code, there is
probably a very large number of point-problems waiting to be fixed.

But suppose that you run out of easily found point problems?  Or that
you want to do something more wide-ranging than fixes for point problems?
What can you do?

Here are a few options.  If you think more about it, I am sure that you
can come up with others.

1.	Put the ten-patches-per-month quota aside for a month (or two or
	three or whatever is required and appropriate).  Spend this time
	studying a given kernel subsystem or a given test framework.
	(Which kernel subsystem?  The best candidates would be those
	having bugs but no active maintainer, but which you have the
	hardware needed to adequately test.)

2.	Add a review and/or test component to your monthly quota, so
	that a given patch could be substituted for by some number of
	Reviewed-by or Tested-by flags.  Of course, this gives your
	a chicken-and-egg problem because you cannot adequately review
	or test without some understanding of the subsystem in question.
	(At least not efficiently enough to get enough Tested-by or
	Reviewed-by flags.)

3.	Set aside a fixed amount of time each week (or each month) to
	learn.  This time needs to be a contiguous block of at least
	four hours.  If you focus your learning appropriately, you might
	be able to contribute more deeply to whatever you learned about
	over time.

	For whatever it is worth, just staring at code is for most people
	an inefficient way to learn.  Exercising the code using tools
	like ftrace or userspace scaffolding can help speed up the
	learning.

4.	Your idea here...

Your current approach seems to be to submit patches and hope that the
maintainer takes it upon himself or herself to teach you.  Unfortunately,
as you might have noticed, a given maintainer might not have the time
or energy to take on full responsibility for your education.

							Thanx, Paul


  reply	other threads:[~2013-09-29 20:23 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-25  1:27 [PATCH tip/core/rcu 0/11] Fixes for 3.13 Paul E. McKenney
2013-09-25  1:29 ` [PATCH tip/core/rcu 01/11] mm: Place preemption point in do_mlockall() loop Paul E. McKenney
2013-09-25  1:29   ` [PATCH tip/core/rcu 02/11] rcu: Use proper cpp macro for ->gp_flags Paul E. McKenney
2013-09-25  1:29   ` [PATCH tip/core/rcu 03/11] rcu: Convert local functions to static Paul E. McKenney
2013-09-25  1:29   ` [PATCH tip/core/rcu 04/11] rcu: Fix dubious "if" condition in __call_rcu_nocb_enqueue() Paul E. McKenney
2013-09-25  1:29   ` [PATCH tip/core/rcu 05/11] rcu: Make list_splice_init_rcu() account for RCU readers Paul E. McKenney
2013-09-25  1:29   ` [PATCH tip/core/rcu 06/11] rcu: Replace __get_cpu_var() uses Paul E. McKenney
2013-09-25  1:29   ` [PATCH tip/core/rcu 07/11] rcu: Silence unused-variable warnings Paul E. McKenney
2013-09-25  1:29   ` [PATCH tip/core/rcu 08/11] rcu: Micro-optimize rcu_cpu_has_callbacks() Paul E. McKenney
2013-09-25  2:55     ` Chen Gang
2013-09-25 20:16       ` Paul E. McKenney
2013-09-26  2:57         ` Chen Gang
2013-09-26 18:33           ` Paul E. McKenney
2013-09-27  2:29             ` Chen Gang
2013-09-29  4:24               ` Chen Gang
2013-09-29 20:23                 ` Paul E. McKenney [this message]
2013-09-30  1:33                   ` Chen Gang
2013-09-25  1:29   ` [PATCH tip/core/rcu 09/11] rcu: Reject memory-order-induced stall-warning false positives Paul E. McKenney
2013-09-25  1:29   ` [PATCH tip/core/rcu 10/11] rcu: Have rcutiny tracepoints use tracepoint_string() Paul E. McKenney
2013-09-25  1:29   ` [PATCH tip/core/rcu 11/11] rcu: Fix CONFIG_RCU_NOCB_CPU_ALL panic on machines with sparse CPU mask Paul E. McKenney
2013-09-25  4:10   ` [PATCH tip/core/rcu 01/11] mm: Place preemption point in do_mlockall() loop Andrew Morton
2013-09-25 13:48     ` Paul E. McKenney
2013-09-25 19:35       ` Andrew Morton
2013-09-25 20:18         ` Paul E. McKenney

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=20130929202342.GE19582@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=darren@dvhart.com \
    --cc=dhowells@redhat.com \
    --cc=dipankar@in.ibm.com \
    --cc=edumazet@google.com \
    --cc=fweisbec@gmail.com \
    --cc=gang.chen@asianux.com \
    --cc=josh@joshtriplett.org \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@kernel.org \
    --cc=niv@us.ibm.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=sbw@mit.edu \
    --cc=tglx@linutronix.de \
    /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