[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201009162126.11515.arnd@arndb.de>
Date: Thu, 16 Sep 2010 21:26:11 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Jan Harkes <jaharkes@...cmu.edu>
Cc: Christoph Hellwig <hch@...radead.org>,
Mikulas Patocka <mikulas@...ax.karlin.mff.cuni.cz>,
Trond Myklebust <Trond.Myklebust@...app.com>,
Petr Vandrovec <vandrove@...cvut.cz>,
Anders Larsen <al@...rsen.net>, Jan Kara <jack@...e.cz>,
Evgeniy Dushistov <dushistov@...l.ru>,
Ingo Molnar <mingo@...e.hu>, Samuel Ortiz <samuel@...tiz.org>,
Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
Andrew Hendry <andrew.hendry@...il.com>
Subject: Re: Remaining BKL users, what to do
On Thursday 16 September 2010 21:00:25 Jan Harkes wrote:
> > Just removing the BKL without the Coda community seems like a heap
> > of pointless work.
>
> It depends, it might get rid of that mount lockup. There shouldn't be
> too much shared state because the kernel module mostly just forwards
> requests to userspace and the BKL right now seems to be mostly used to
> protects access to the upcall lists and could probably without too much
> trouble be replaced with a single 'global' (but Coda-only) or
> mount-point specific mutex.
Ok, that would be nice.
There are two strategies forward then based on the current code:
1. introduce a global or per-superblock mutex and convert all
instances of lock-kernel to that, then see what breaks (lockdep
helps here) and fix up all places where you get potential
deadlocks. The easiest replacement would be the existing superblock
mutex, doing s/lock_kernel()/lock_super(sb)/.
2. understand what data structures are actually being protected
by the BKL right now, then add proper locking around all accesses
to them and finally remove all uses of the BKL.
Arnd
--
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