public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Gautham R Shenoy <ego@in.ibm.com>
To: Paul Jackson <pj@sgi.com>
Cc: ego@in.ibm.com, rusty@rustcorp.com.au, torvalds@osdl.org,
	mingo@elte.hu, akpm@osdl.org, linux-kernel@vger.kernel.org,
	paulmck@us.ibm.com, vatsa@in.ibm.com, dipankar@in.ibm.com,
	gaughen@us.ibm.com, arjan@linux.intel.org, davej@redhat.com,
	venkatesh.pallipadi@intel.com, kiran@scalex86.org
Subject: Re: [PATCH 4/5] lock_cpu_hotplug: Redesign - Lightweight implementation of lock_cpu_hotplug.
Date: Fri, 27 Oct 2006 09:19:25 +0530	[thread overview]
Message-ID: <20061027034925.GA4023@in.ibm.com> (raw)
In-Reply-To: <20061026141450.53b48b88.pj@sgi.com>

On Thu, Oct 26, 2006 at 02:14:50PM -0700, Paul Jackson wrote:
> Gautham wrote:
> + *- Readers assume control iff:					*
> + *    a) No other reader has a reference and no writer is writing.	*
> + *    OR								*
> + *    b) Atleast one reader (on *any* cpu) has a reference.		*
> 
> Isn't this logically equivalent to stating:
> 
>   *- Readers assume control iff no writer is writing

It is logically equivalent, but...

> (Or if it's not equivalent, it might be interesting to state why.)

I think it needs to be rephrased. 

Because there may be a situation where nr_readers = 0, when a writer
arrives. The writer sets the flag to WRITER_WAITING and performs
a synchronize_sched.

During this time, if a new reader arrives at the scene, it would still
go to sleep, because there are no other active readers in the system.
This despite the fact that the writer is not *writing*.

Thanks for pointing that out :-)

> 
> -- 
>                   I won't rest till it's the best ...
>                   Programmer, Linux Scalability
>                   Paul Jackson <pj@sgi.com> 1.925.600.0401

Regards
gautham.
-- 
Gautham R Shenoy
Linux Technology Center
IBM India.
"Freedom comes with a price tag of responsibility, 
which is still a bargain, because Freedom is priceless!"

      reply	other threads:[~2006-10-27  3:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-26 10:48 [RFC 0/5] lock_cpu_hotplug: Redesign - A "lightweight" scalable version Gautham R Shenoy
2006-10-26 10:50 ` [PATCH 1/5] lock_cpu_hotplug:Redesign - Fix coding style issues in cpufreq Gautham R Shenoy
2006-10-26 10:53   ` [PATCH 2/5] lock_cpu_hotplug:Redesign - remove lock_cpu_hotplug from hot-cpu_callback path " Gautham R Shenoy
2006-10-26 10:55     ` [PATCH 3/5] lock_cpu_hotplug:Redesign - Use lock_cpu_hotplug in workqueue.c instead of workqueue_mutex Gautham R Shenoy
2006-10-26 10:57       ` [PATCH 4/5] lock_cpu_hotplug: Redesign - Lightweight implementation of lock_cpu_hotplug Gautham R Shenoy
2006-10-26 10:58         ` [PATCH 5/5] lock_cpu_hotplug: Redesign - Lockdep support for lightweight lock_cpu_hotplug Gautham R Shenoy
2006-10-26 21:14         ` [PATCH 4/5] lock_cpu_hotplug: Redesign - Lightweight implementation of lock_cpu_hotplug Paul Jackson
2006-10-27  3:49           ` Gautham R Shenoy [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=20061027034925.GA4023@in.ibm.com \
    --to=ego@in.ibm.com \
    --cc=akpm@osdl.org \
    --cc=arjan@linux.intel.org \
    --cc=davej@redhat.com \
    --cc=dipankar@in.ibm.com \
    --cc=gaughen@us.ibm.com \
    --cc=kiran@scalex86.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulmck@us.ibm.com \
    --cc=pj@sgi.com \
    --cc=rusty@rustcorp.com.au \
    --cc=torvalds@osdl.org \
    --cc=vatsa@in.ibm.com \
    --cc=venkatesh.pallipadi@intel.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