From: Greg Lindahl <lindahl@conservativecomputer.com>
To: axp-list@redhat.com
Subject: More fun with spinlocks
Date: Sat, 14 Apr 2001 20:14:31 -0400 [thread overview]
Message-ID: <20010414201431.B18054@wumpus.int.den.wayport.net> (raw)
OK, so how do I read this:
xprt.c:1052 spinlock stuck in hybcst.d0000.fs at fffffc00003ee468(0)
owner rsh at fffffc00003ee900(1) xprt.c:1146
wait_on_bh, CPU 1: 0000000000000000
irq: 1 [1 0]
bh: 1 [1 0]
The machine is a 2-cpu UP2000 running 2.2.19. Looks like the 2
processes involved are rsh and hybcst (the weather code that is used
to predict weather for US airlines...), and the spinlock was taken at
linux/net/sunrpc/xprt.c line 1146 and the other guy who wants it is in
linux/net/sunrpc/xprt.c line 1052... known problem? It's an nfs v3
thing.
*
* Releases the socket for use by other requests.
*/
void
xprt_up_transmit(struct rpc_task *task)
{
struct rpc_xprt *xprt = task->tk_rqstp->rq_xprt;
if (xprt->snd_task && xprt->snd_task == task) {
unsigned long oldflags;
spin_lock_irqsave(&xprt_sock_lock, oldflags);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
xprt->snd_task = NULL;
if (!rpc_wake_up_next(&xprt->sending) && xprt->stream)
xprt_add_tcp_timer(xprt, RPCXPRT_TIMEOUT);
spin_unlock_irqrestore(&xprt_sock_lock, oldflags);
}
}
And the person who wants it is xprt.c:1052:
/*
* The following 2 routines allow a task to sleep while socket memory is
* low.
*/
static void
tcp_write_space(struct sock *sk)
{
struct rpc_xprt *xprt;
unsigned long oldflags;
if (!(xprt = xprt_from_sock(sk)))
return;
if (xprt->shutdown)
return;
/* Wait until we have enough socket memory */
if (sock_wspace(sk) < min(sk->sndbuf,XPRT_MIN_WRITE_SPACE))
return;
if (xprt_test_and_set_wspace(xprt))
goto out;
spin_lock_irqsave(&xprt_sock_lock, oldflags);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
if (xprt->snd_task && xprt->snd_task->tk_rpcwait == &xprt->sending)
rpc_wake_up_task(xprt->snd_task);
spin_unlock_irqrestore(&xprt_sock_lock, oldflags);
out:
wake_up_interruptible(sk->sleep);
}
Is this a known problem?
next reply other threads:[~2001-04-15 0:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-15 0:14 Greg Lindahl [this message]
2001-04-19 3:29 ` More fun with spinlocks Greg Lindahl
-- strict thread matches above, loose matches on Subject: below --
2001-04-19 5:30 Greg Lindahl
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox