All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Dike <jdike@addtoit.com>
To: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] [PATCH] [RFC] uml: make activate_fd atomic
Date: Mon, 7 Aug 2006 17:13:52 -0400	[thread overview]
Message-ID: <20060807211352.GA5890@ccure.user-mode-linux.org> (raw)
In-Reply-To: <20060806154431.32159.74360.stgit@memento.home.lan>

On Sun, Aug 06, 2006 at 05:44:31PM +0200, Paolo 'Blaisorblade' Giarrusso wrote:
> I had this patch in my queue since some time, because it fixes some spinlocks vs
> sleeps issues; please verify whether after your restructuring it is still
> needed (it applied before this restructuring).

I believe this patch is no longer needed.  It looks like all calls to
activate_fd are in process context.  However, there are a few places
where it can be reached inside a spinlock.  These cases look like the
spinlock is held for too long, and needs to be narrowed.

Here's my work, if you feel like checking it.  Increasing indendation
is going up the call chain.  At the top of each chain, there's a
"proc", along with my reason for believing the procedure is only
called in process context.  When that's not there, it's because that
call tree had already been covered ealier.

There's some stuff in the network which I didn't go into because it's
code I have no clue about.

Every procedure can call activate_fd under a spinlock is so marked.

activate_fd can recurse to itself, but only once.  This happens when
the first descriptor needing sigio coverage is activated.  The sigio
thread will be started, a pipe to it created, and an irq registered
for that pipe.

activate_fd
    um_request_irq
        line_setup_irq
	    enable_chan
		line_open - SPINLOCK
		    ssl_open, con_open - tty_operations.open
			tty_open - proc, in response to open(2)
	register_winch_irq
	    register_winch
		chan_enable_winch
		    line_open
	    is_tracer_winch, is_skas_winch
		register_winch
	mconsole_fuse - proc, work_proc
	mconsole_init - proc, initcall
	uml_net_open - struct net_device.open, SPINLOCK
	    dev_open
		dev_change_flags - ?
		ipmr_new_tunnel - ?
		ipmr_reg_vif - ?
	port_accept
	    port_work_proc - proc, work_proc
	port_data
	    port_init - chan_ops.init
		parse_chan
		    parse_chan_pair
			line_config
			lines_init
			    ssl_config, con_config
				line_driver.mc.config - mconsole_devices
				    mconsole_config - proc, work_proc
	xterm_fd
	    xterm_open
		chan_ops.open
		    open_one_chan
			open_chan
			    console_open_chan
				ssl_console_setup, uml_console_setup - struct console.setup
				    register_console
					mc_add_console - proc, initcall
					ssl_init - proc, initcall
					stderr_console_init - proc, initcall
					stdio_init - proc, initcall
	x11_probe
	    x11_init - proc, initcall
	init_aio_irq
	    init_aio - proc, initcall
	write_sigio_irq
	    write_sigio_workaround - SPINLOCK
		maybe_sigio_broken
		    activate_fd

				Jeff

-------------------------------------------------------------------------
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
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

  reply	other threads:[~2006-08-07 21:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-06 15:44 [uml-devel] [PATCH] [RFC] uml: make activate_fd atomic Paolo 'Blaisorblade' Giarrusso
2006-08-07 21:13 ` Jeff Dike [this message]
2006-08-19 15:52   ` Blaisorblade
2006-08-21 23:04     ` Jeff Dike
2006-09-24  9:54       ` Blaisorblade

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=20060807211352.GA5890@ccure.user-mode-linux.org \
    --to=jdike@addtoit.com \
    --cc=blaisorblade@yahoo.it \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.