[<prev] [next>] [day] [month] [year] [list]
Message-ID: <KL1P15301MB00083B630B86DB1A1FE16FE7BF820@KL1P15301MB0008.APCP153.PROD.OUTLOOK.COM>
Date: Wed, 16 Aug 2017 03:39:17 +0000
From: Dexuan Cui <decui@...rosoft.com>
To: "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"devel@...uxdriverproject.org" <devel@...uxdriverproject.org>
CC: KY Srinivasan <kys@...rosoft.com>,
Stephen Hemminger <sthemmin@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"olaf@...fle.de" <olaf@...fle.de>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
"jasowang@...hat.com" <jasowang@...hat.com>,
"apw@...onical.com" <apw@...onical.com>,
Andy Lutomirski <luto@...nel.org>,
"marcelo.cerri@...onical.com" <marcelo.cerri@...onical.com>,
"leann.ogasawara@...onical.com" <leann.ogasawara@...onical.com>,
"Rolf Neugebauer" <rolf.neugebauer@...ker.com>,
'Marcelo Cerri' <marcelo.cerri@...onical.com>
Subject: [PATCH] vmbus: suppress uevents for hv_sock devices
hv_sock driver is automatically loaded when an application creates an
AF_VSOCK socket, so we don't really need to trigger uevents to the user
space udevd.
And hv_sock devices can appear and disappear frequency, e.g. 100 per
second, so triggering the udevents can cause a high cpu utilization of
udevd, e.g. 30% on a 2-cpu virtual machine. So let's suppress the
uevents to avoid this.
Signed-off-by: Dexuan Cui <decui@...rosoft.com>
Cc: K. Y. Srinivasan <kys@...rosoft.com>
Cc: Haiyang Zhang <haiyangz@...rosoft.com>
Cc: Stephen Hemminger <sthemmin@...rosoft.com>
---
drivers/hv/vmbus_drv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
index ed84e96..a0cf592 100644
--- a/drivers/hv/vmbus_drv.c
+++ b/drivers/hv/vmbus_drv.c
@@ -1171,6 +1171,8 @@ int vmbus_device_register(struct hv_device *child_device_obj)
child_device_obj->device.parent = &hv_acpi_dev->dev;
child_device_obj->device.release = vmbus_device_release;
+ if (is_hvsock_channel(child_device_obj->channel))
+ dev_set_uevent_suppress(&child_device_obj->device, 1);
/*
* Register with the LDM. This will kick off the driver/device
* binding...which will eventually call vmbus_match() and vmbus_probe()
--
2.7.4
Powered by blists - more mailing lists