# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1188553538 -3600
# Node ID f30b59f550c2ac03734c7a8cb63f658f16ca087a
# Parent 720571c2139e66aecb2552a59be897fda40238fa
xen: Use unlocked_ioctl in evtchn, gntdev and privcmd drivers to avoid
acquiring the BKL sempahore. Performance improvement is particularly
significant for heavy users of evtchn-notify ioctl.
Suggested by Dexuan Cui <dexuan.cui@xxxxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
drivers/xen/evtchn/evtchn.c | 6 +++---
drivers/xen/gntdev/gntdev.c | 8 ++++----
drivers/xen/privcmd/privcmd.c | 8 ++++----
3 files changed, 11 insertions(+), 11 deletions(-)
diff -r 720571c2139e -r f30b59f550c2 drivers/xen/evtchn/evtchn.c
--- a/drivers/xen/evtchn/evtchn.c Thu Aug 30 16:23:39 2007 +0100
+++ b/drivers/xen/evtchn/evtchn.c Fri Aug 31 10:45:38 2007 +0100
@@ -208,8 +208,8 @@ static void evtchn_bind_to_user(struct p
spin_unlock_irq(&port_user_lock);
}
-static int evtchn_ioctl(struct inode *inode, struct file *file,
- unsigned int cmd, unsigned long arg)
+static long evtchn_ioctl(struct file *file,
+ unsigned int cmd, unsigned long arg)
{
int rc;
struct per_user_data *u = file->private_data;
@@ -423,7 +423,7 @@ static const struct file_operations evtc
.owner = THIS_MODULE,
.read = evtchn_read,
.write = evtchn_write,
- .ioctl = evtchn_ioctl,
+ .unlocked_ioctl = evtchn_ioctl,
.poll = evtchn_poll,
.fasync = evtchn_fasync,
.open = evtchn_open,
diff -r 720571c2139e -r f30b59f550c2 drivers/xen/gntdev/gntdev.c
--- a/drivers/xen/gntdev/gntdev.c Thu Aug 30 16:23:39 2007 +0100
+++ b/drivers/xen/gntdev/gntdev.c Fri Aug 31 10:45:38 2007 +0100
@@ -133,7 +133,7 @@ static int gntdev_open(struct inode *ino
static int gntdev_open(struct inode *inode, struct file *flip);
static int gntdev_release(struct inode *inode, struct file *flip);
static int gntdev_mmap(struct file *flip, struct vm_area_struct *vma);
-static int gntdev_ioctl (struct inode *inode, struct file *flip,
+static long gntdev_ioctl(struct file *flip,
unsigned int cmd, unsigned long arg);
static struct file_operations gntdev_fops = {
@@ -141,7 +141,7 @@ static struct file_operations gntdev_fop
.open = gntdev_open,
.release = gntdev_release,
.mmap = gntdev_mmap,
- .ioctl = gntdev_ioctl
+ .unlocked_ioctl = gntdev_ioctl
};
/* VM operations. */
@@ -774,8 +774,8 @@ static void gntdev_vma_close(struct vm_a
/* Called when an ioctl is made on the device.
*/
-static int gntdev_ioctl(struct inode *inode, struct file *flip,
- unsigned int cmd, unsigned long arg)
+static long gntdev_ioctl(struct file *flip,
+ unsigned int cmd, unsigned long arg)
{
int rc = 0;
gntdev_file_private_data_t *private_data =
diff -r 720571c2139e -r f30b59f550c2 drivers/xen/privcmd/privcmd.c
--- a/drivers/xen/privcmd/privcmd.c Thu Aug 30 16:23:39 2007 +0100
+++ b/drivers/xen/privcmd/privcmd.c Fri Aug 31 10:45:38 2007 +0100
@@ -37,8 +37,8 @@ static int privcmd_enforce_singleshot_ma
static int privcmd_enforce_singleshot_mapping(struct vm_area_struct *vma);
#endif
-static int privcmd_ioctl(struct inode *inode, struct file *file,
- unsigned int cmd, unsigned long data)
+static long privcmd_ioctl(struct file *file,
+ unsigned int cmd, unsigned long data)
{
int ret = -ENOSYS;
void __user *udata = (void __user *) data;
@@ -250,8 +250,8 @@ static int privcmd_enforce_singleshot_ma
#endif
static const struct file_operations privcmd_file_ops = {
- .ioctl = privcmd_ioctl,
- .mmap = privcmd_mmap,
+ .unlocked_ioctl = privcmd_ioctl,
+ .mmap = privcmd_mmap,
};
static int capabilities_read(char *page, char **start, off_t off,
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|