Revision 42b5212fee4f57907e9415b18fe19c13e65574bc authored by David Vrabel on 02 February 2015, 16:57:51 UTC, committed by David S. Miller on 03 February 2015, 03:39:04 UTC
After commit e9d8b2c2968499c1f96563e6522c56958d5a1d0d (xen-netback:
disable rogue vif in kthread context), a fatal (protocol) error would
leave the guest Rx thread spinning, wasting CPU time.  Commit
ecf08d2dbb96d5a4b4bcc53a39e8d29cc8fef02e (xen-netback: reintroduce
guest Rx stall detection) made this even worse by removing a
cond_resched() from this path.

Since a fatal error is non-recoverable, just allow the guest Rx thread
to exit.  This requires taking additional refs to the task so the
thread exiting early is handled safely.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Reported-by: Julien Grall <julien.grall@linaro.org>
Tested-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 5a2e87b
Raw File
udev.txt
The DVB subsystem currently registers to the sysfs subsystem using the
"class_simple" interface.

This means that only the basic information like module loading parameters
are presented through sysfs. Other things that might be interesting are
currently *not* available.

Nevertheless it's now possible to add proper udev rules so that the
DVB device nodes are created automatically.

We assume that you have udev already up and running and that have been
creating the DVB device nodes manually up to now due to the missing sysfs
support.

0. Don't forget to disable your current method of creating the
device nodes manually.

1. Unfortunately, you'll need a helper script to transform the kernel
sysfs device name into the well known dvb adapter / device naming scheme.
The script should be called "dvb.sh" and should be placed into a script
dir where udev can execute it, most likely /etc/udev/scripts/

So, create a new file /etc/udev/scripts/dvb.sh and add the following:
------------------------------schnipp------------------------------------------------
#!/bin/sh
/bin/echo $1 | /bin/sed -e 's,dvb\([0-9]\)\.\([^0-9]*\)\([0-9]\),dvb/adapter\1/\2\3,'
------------------------------schnipp------------------------------------------------

Don't forget to make the script executable with "chmod".

1. You need to create a proper udev rule that will create the device nodes
like you know them. All real distributions out there scan the /etc/udev/rules.d
directory for rule files. The main udev configuration file /etc/udev/udev.conf
will tell you the directory where the rules are, most likely it's /etc/udev/rules.d/

Create a new rule file in that directory called "dvb.rule" and add the following line:
------------------------------schnipp------------------------------------------------
KERNEL="dvb*", PROGRAM="/etc/udev/scripts/dvb.sh %k", NAME="%c"
------------------------------schnipp------------------------------------------------

If you want more control over the device nodes (for example a special group membership)
have a look at "man udev".

For every device that registers to the sysfs subsystem with a "dvb" prefix,
the helper script /etc/udev/scripts/dvb.sh is invoked, which will then
create the proper device node in your /dev/ directory.
back to top