From: Arnd Bergmann <arnd@arndb.de>
To: linux-kernel@vger.kernel.org
Cc: Christoph Hellwig <hch@lst.de>, Andi Kleen <andi@firstfloor.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Arnd Bergmann <arnd@arndb.de>,
Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@elte.hu>
Subject: [PATCH 5/5] compat_ioctl: do not hold BKL in handlers
Date: Thu, 6 Aug 2009 15:09:30 +0200 [thread overview]
Message-ID: <1249564170-18627-6-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1249564170-18627-1-git-send-email-arnd@arndb.de>
We have always called ioctl conversion handlers under the big
kernel lock, although that is generally not necessary. In particular
it is not needed for conversion of data structures and for calling
sys_ioctl or do_vfs_ioctl, which will get the BKL again if needed.
Handlers doing more than those two have been moved out, so we
can kill off the BKL from compat_sys_ioctl. This may significantly
improve latencies with 32 bit applications, and it avoids a common
scenario where a thread acquires the BKL twice.
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
fs/compat_ioctl.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
index 5d800aa..86e6c75 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -2637,9 +2637,7 @@ asmlinkage long compat_sys_ioctl(unsigned int fd, unsigned int cmd,
found_handler:
if (t->handler) {
- lock_kernel();
error = t->handler(fd, cmd, arg, filp);
- unlock_kernel();
goto out_fput;
}
--
1.6.3.3
prev parent reply other threads:[~2009-08-06 13:10 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-06 13:09 [PATCH 0/5] Kill the BKL in compat ioctl handling Arnd Bergmann
2009-08-06 13:09 ` [PATCH 1/5] arch/um: handle compat_ioctl in tty line driver Arnd Bergmann
2009-08-13 5:08 ` Amerigo Wang
2009-08-06 13:09 ` [PATCH 2/5] s390: move keyboard compat ioctls into tty3270 driver Arnd Bergmann
2009-08-06 13:09 ` [PATCH 3/5] tty: handle VT specific compat ioctls in vt driver Arnd Bergmann
2009-08-07 6:23 ` Frederic Weisbecker
2009-08-07 7:04 ` Arnd Bergmann
2009-08-07 8:04 ` Frederic Weisbecker
2009-08-07 12:02 ` Arnd Bergmann
2009-08-08 0:34 ` Frederic Weisbecker
2009-08-08 0:41 ` Greg KH
2009-08-08 1:03 ` Frederic Weisbecker
2009-08-08 3:20 ` Greg KH
2009-08-10 16:24 ` Arnd Bergmann
2009-08-07 9:57 ` Alan Cox
2009-08-07 19:23 ` Frederic Weisbecker
2009-08-06 13:09 ` [PATCH 4/5] compat_ioctl: remove VT specific ioctl handlers Arnd Bergmann
2009-08-06 13:09 ` Arnd Bergmann [this message]
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=1249564170-18627-6-git-send-email-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=andi@firstfloor.org \
--cc=fweisbec@gmail.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=viro@zeniv.linux.org.uk \
/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
all inboxes | Powered by JetHome®