lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 27 Oct 2006 09:19:25 +0530
From:	Gautham R Shenoy <ego@...ibm.com>
To:	Paul Jackson <pj@....com>
Cc:	ego@...ibm.com, rusty@...tcorp.com.au, torvalds@...l.org,
	mingo@...e.hu, akpm@...l.org, linux-kernel@...r.kernel.org,
	paulmck@...ibm.com, vatsa@...ibm.com, dipankar@...ibm.com,
	gaughen@...ibm.com, arjan@...ux.intel.org, davej@...hat.com,
	venkatesh.pallipadi@...el.com, kiran@...lex86.org
Subject: Re: [PATCH 4/5] lock_cpu_hotplug: Redesign - Lightweight implementation of lock_cpu_hotplug.

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@....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!"
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ