public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Waychison <Michael.Waychison@Sun.COM>
To: linux-os@analogic.com
Cc: Linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: More linux-2.6.9 module problems
Date: Tue, 09 Nov 2004 14:51:48 -0500	[thread overview]
Message-ID: <41911FD4.2060902@sun.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0411081148520.5510@chaos.analogic.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

linux-os wrote:
> 
> I have a memory-test procedure that tests
> memory on a board, accessed via the PCI bus.
> There is a lot of RAM and it's bank-switched
> into some 64k windows so it takes a lot of
> time to test, about 60 seconds.
> 
> This is in a module, therefore inside the kernel.
> When it is invoked via an ioctl() call, the
> kernel is frozen for the whole test-time. The
> test procedure does not use any spin-locks nor
> does it even use any semaphores. It just does a
> bunch of read/write operations over the PCI/Bus.
> 
> I thought that I could enable the preemptible-
> kernel option and the machine would then respond
> normally. Not so. Even with 4 CPUs, when one
> ioctl() is busy in the kernel, nothing else
> happens until its done. Even keyboard activity
> is gone, no Caps Lock and no Num Lock, no `ping`
> response over the network. However, the machine
> comes back to life when the memory-test is done.
> 
> This is kernel version 2.6.9. Is it possible that
> somebody left on the BKL when calling a module
> ioctl() on this version? If not, what do I do
> to be able to execute a time-consuming procedure
> from inside the kernel? Do I break it up into
> sections and execute schedule() periodically
> (temporary work-around --works)??
> 

The BKL has always been grabbed across ioctls.  Drop the lock when you
enter your f_op->ioctl call and grab it again open completion.

- --
Mike Waychison
Sun Microsystems, Inc.
1 (650) 352-5299 voice
1 (416) 202-8336 voice

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTICE:  The opinions expressed in this email are held by me,
and may not represent the views of Sun Microsystems, Inc.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBkR/UdQs4kOxk3/MRAqYmAJwM4wQFhGis831m50lzqOKnCY0BEgCeOtXY
4TmvEX9mmXfsT2L9EinlwiM=
=fiO5
-----END PGP SIGNATURE-----

  reply	other threads:[~2004-11-09 19:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-08 16:50 More linux-2.6.9 module problems linux-os
2004-11-09 19:51 ` Mike Waychison [this message]
2004-11-09 20:25   ` linux-os
2004-11-09 21:43     ` Mike Waychison
2004-11-09 22:17       ` linux-os
2004-11-09 22:32         ` Mike Waychison
2004-11-09 23:11           ` linux-os
2004-11-10  0:10             ` linux-os

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=41911FD4.2060902@sun.com \
    --to=michael.waychison@sun.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-os@analogic.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox