Re: [PATCH 02/10] rwsem: fully separate code pathes to wake writers vs readers

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Howells
Date: Wednesday, May 19, 2010 - 5:04 am

Michel Lespinasse <walken@google.com> wrote:


There's an unnecessary blank line here.


I hate code that jumps into braced blocks with goto.  Would it be possible for
you to do:

	readers_only:
		if (downgrading)
			goto wake_readers;
	...
	wake_readers:
		/* Grant an infinite number of read locks to the readers at the front
	...

instead, please?

Also, since the labels 'undo' and 'try_again' are now specific to the writer
path, can you label them 'undo_write' and 'try_again_write' just to make it
obvious?

Other than that, no particular objections to this patch.

David
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 00/10] V3: rwsem changes + down_read_critical() pro ..., Michel Lespinasse, (Mon May 17, 3:25 pm)
[PATCH 03/10] rwsem: lighter active count checks when waki ..., Michel Lespinasse, (Mon May 17, 3:25 pm)
[PATCH 04/10] rwsem: let RWSEM_WAITING_BIAS represent any ..., Michel Lespinasse, (Mon May 17, 3:25 pm)
[PATCH 05/10] rwsem: wake queued readers when writer block ..., Michel Lespinasse, (Mon May 17, 3:25 pm)
[PATCH 06/10] rwsem: smaller wrappers around rwsem_down_fa ..., Michel Lespinasse, (Mon May 17, 3:25 pm)
[PATCH 07/10] generic rwsem: implement down_read_critical( ..., Michel Lespinasse, (Mon May 17, 3:25 pm)
[PATCH 08/10] rwsem: down_read_critical infrastructure support, Michel Lespinasse, (Mon May 17, 3:25 pm)
[PATCH 09/10] x86 rwsem: down_read_critical implementation, Michel Lespinasse, (Mon May 17, 3:25 pm)
Re: [PATCH 07/10] generic rwsem: implement down_read_criti ..., Michel Lespinasse, (Mon May 17, 4:13 pm)
Re: [PATCH 07/10] generic rwsem: implement down_read_criti ..., Michel Lespinasse, (Mon May 17, 4:20 pm)
Re: [PATCH 01/10] x86 rwsem: minor cleanups, David Howells, (Wed May 19, 4:47 am)
Re: [PATCH 02/10] rwsem: fully separate code pathes to wak ..., David Howells, (Wed May 19, 5:04 am)
Re: [PATCH 07/10] generic rwsem: implement down_read_criti ..., Michel Lespinasse, (Wed May 19, 4:47 pm)
Re: [PATCH 01/10] x86 rwsem: minor cleanups, Michel Lespinasse, (Thu May 20, 2:37 pm)
Re: [PATCH 02/10] rwsem: fully separate code pathes to wak ..., Michel Lespinasse, (Thu May 20, 2:48 pm)
Re: [PATCH 03/10] rwsem: lighter active count checks when ..., Michel Lespinasse, (Thu May 20, 3:33 pm)
Re: [PATCH 08/10] rwsem: down_read_critical infrastructure ..., Michel Lespinasse, (Thu May 20, 4:30 pm)
Re: [PATCH 07/10] generic rwsem: implement down_read_criti ..., Michel Lespinasse, (Thu May 20, 8:35 pm)