Gmane
Favicon
From: Matt Helsley <matthltc <at> us.ibm.com>
Subject: [RFC][PATCH 00/11] Process Events modularization using Global Task Notifiers
Newsgroups: gmane.linux.lse
Date: 2006-05-17 05:54:19 GMT (3 years, 6 weeks, 6 days, 22 hours and 56 minutes ago)
Jes, all,

	I've built on Chandra's Task Notifiers patch to modularize the process
events connector. I haven't completed testing, however I thought I'd
post the patches to get some early feedback.

	I believe I've cc'd everyone from the original "simple task notifier
support" thread. Please speak up if I've neglected to add you or you're
no longer interested :).

PATCHES

This series applies to 2.6.17-rc4-mm1:

task_notifiers.patch

	The patch posted by Chandra, updated for 2.6.17-rc4-mm1.

tn_move_fork_notification
tn_move_exec_notification

	Move the location of the fork and exec notification chain calls
	as I recommended in:
	http://marc.theaimsgroup.com/?l=lse-tech&m=114618434520870&w=4

tn_make_exit_code_valid_in_task_notifier_handlers

	This patch moves assignment of the task's exit code to allow
	registered handlers access to the valid exit_code field.

tn_renumber

	This patch changes the values for each invocation to reflect
	roughly the order they are expected to be called while also
	providing room for new values.

tn_add_id_notifications

	This patch adds notification for id changes.

tn_registration

	This patch adds externs describing the registration functions
	in include/linux/notifier.h. Honestly, I'm not sure where they
	belong. However, something like this is necessary so that
	modules can take advantage of Task Notifiers.

protect_task_notifier_chain

	This patch switches Task Notifiers from atomic to blocking. This
	means it uses a global rwsem and allows handlers to block.

cn_proc_move_exit_connector

	This patch moves the location used to invoke 
	proc_exit_connector. It's intended to make the next patch
	easier to understand and does not affect functionality.

cn_proc_modularize

	This patch uses Task Notifiers to invoke the Process Events
	Connector functions. Note that it removes the invokations
	of functions in fork/exec/[re][ug]id/exit paths.

per_task_notifiers

	This patch introduces a module that demonstrates what I was
	trying to describe with the "2-level mechanism" discussion
	earlier. Unlike the the previous portions of this series, this
	patch is completely untested (see TESTING). It's intended to
	show one way per-task notifier chains can be implemented using
	the global task notifier mechanism.

	That's it for the series of patches. Something very much like Alan
Stern's quick rwsem implementation should be usable for the blocking
notifier chains if cacheline bouncing is a concern.

TESTING

	I've done some quick testing by hand to ensure that the patches
compile, boot, and that the process events connector still functions as
expected. I also repeatedly ran LTP with and without the series applied.
In all runs there was a signal 11 in the clone06:
clone06     1  BROK  :  Unexpected signal 11 received.

	The fact that it was in all runs suggests it was not caused by the
patches.

	I've only tested with a configuration where connector and process
events are both modules. I still need to test the other 4 combinations
(cn:y, cn_proc:m; yy; yn; nn) just to be sure.

Cheers,
	-Matt Helsley

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642