[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1307270324.25014.14.camel@t41.thuisdomein>
Date: Sun, 05 Jun 2011 12:38:43 +0200
From: Paul Bolle <pebolle@...cali.nl>
To: Jens Axboe <jaxboe@...ionio.com>
Cc: "paulmck@...ux.vnet.ibm.com" <paulmck@...ux.vnet.ibm.com>,
Vivek Goyal <vgoyal@...hat.com>,
linux kernel mailing list <linux-kernel@...r.kernel.org>
Subject: Re: Mysterious CFQ crash and RCU
On Sun, 2011-06-05 at 10:39 +0200, Paul Bolle wrote:
> 0) I'd guess not, as the last thing I tried before simply ripping
> io_context.ioc_data out, was:
>
> spin_lock_irqsave(&ioc->lock, flags);
> rcu_read_lock();
> ioc_data = rcu_dereference(ioc->ioc_data);
> rcu_read_unlock();
> if (ioc_data == cic)
> rcu_assign_pointer(ioc->ioc_data, NULL);
> spin_unlock_irqrestore(&ioc->lock, flags);
0) Strike that. It does seem to fix it. I must have done something silly
while doing yet another test of this stuff (perhaps by forgetting to
remove an old, crashing version of the cfq_iosched module before
installing a new version and switching back to cfq).
1) Jens, I suggest I'll send in a small series of patches, along these
lines:
- cleanup: make two functions static in block/cfq-iosched.c
- cleanup: rename io_context.cic_list -> io_context.cic_hlist
rename io_context.ioc_data -> io_context.last_cic
change io_context.last_cic from void* to cfq_io_context*
rename cfq_io_context.cic_list -> cfq_io_context.cic_node
- cleanup: rename *ret -> *ioc in two functions
- locking: make sure io_context.last_cic is accessed under
io_context.lock and using the required RCU voodoo
2) Any objections beforehand?
Paul Bolle
--
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