Commit Graph

10728 Commits

Author SHA1 Message Date
Anthony G. Basile
3677c2e3ae hwdb and rules: import changes from upstream. 2015-10-12 06:43:45 -04:00
Ian Stakenvicius
305f0eef4d Forward-ported network rule-generator code from eudev-1.10 2015-09-25 12:38:07 -04:00
Anthony G. Basile
389b9ce228 Revert "udevd: warn if we receive SIGCHLD from untracked worker"
This reverts commit 75e930ed64.

This fixes issue #121.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-09-11 14:56:07 -04:00
blueness
696a663370 Merge pull request #123 from gentoo/nonrot
Solid state drives should use noop IO elevator
2015-09-11 14:45:41 -04:00
blueness
0cc8789c71 Merge pull request #122 from RomainNaour/musl-fixes
Musl fixes
2015-09-11 14:44:10 -04:00
blueness
6de52b4e64 Merge pull request #124 from rcsheets/debug-output-spacing-fix
Add missing space between filename and error message
2015-09-11 14:42:27 -04:00
Robert C. Sheets
55015c019d Add missing space between filename and error message 2015-09-08 02:12:10 -07:00
Richard Yao
b38f3aaba1 Solid state drives should use noop IO elevator
It is often suggested that users set noop on SSDs and it turns out that
udev can do this for users.

Setting noop disables the IO priorization and IO reordering logic inside
the kernel, but leaves front/back merging in place. This reduction in
overhead should increase the number of requests sent to solid state
media to the maximum possible,which is said to improve performance on
SSDs. Unfortunately, few benchmarks try real world work loads with a
clear cache to measure the actual difference.

The benchmarks conducted by Daniel Nashed cleared the cache. They favor
noop, although the workload seems somewhat unrealistic:

http://blog.nashcom.de/nashcomblog.nsf/dx/linux-io-performance-tweek.htm

The BFQ developers' benchmarks on SSDs appear to account for both. They
show noop as being far better than CFQ and second only to BFQ, which is
out of tree:

https://lwn.net/Articles/600366/

In addition, I have experienced lockup-like effects on ext4 on an OCZ
Vertex 2 SSD with the discard mount option enabled when recursively
unlinking a subdirectory path that contains millions of files. The
system was useless for hours. Setting noop allowed the unlink to finish
in minutes. This is because the reordering from CFQ interleaved the
TRIM command with write IOs, effectively putting barriers between them
because because TRIM is a non-queued command prior to SATA 3.1.

A good default should perform well in general and have the property that
poor performance in the worst case scenarios is minimized. The
previous examples contradict CFQ's ability to achieve that on solid
state media.

I believe that we should implement a udev rule to set noop on solid
state media by default. It should be said that Milan Broz wrote it
first, although there is only one way to write this rule in a manner
consistent with the codebase:

http://permalink.gmane.org/gmane.linux.kernel.device-mapper.dm-crypt/6045

It should be said that this will be a regression for those that rely on
the "Block IO Controller" cgroup because it is only supported by CFQ
when CONFIG_CFQ_GROUP_IOSCHED=y. My experience as a ZoL developer is
that very few users rely on this behavior and consequently, I believe
that the benefit from enabling this far outweighs the harm to the few
that need it. Those that do need it should be able to disable this rule
themselves. Container management software that expects the Block IO
Controller to be supported should be modified to enable CFQ explicitly
if it does not already do that.

This has been tested against both a SATA mechanical drive and a SATA
solid state drive. It changes the elevator to noop on the solid state
drive, but does not touch it on the mechanical drive.

Signed-off-by: Richard Yao <ryao@gentoo.org>
2015-08-29 15:21:44 -04:00
Romain Naour
0e2be0c217 build-sys: check for strndupa
strndupa is a GNU extension, therefore it's not available
for all libc libraries (musl).

This patch is based on the one proposed by Emil Renner Berthing for
systemd [1].

[1] http://lists.freedesktop.org/archives/systemd-devel/2014-September/023190.html

Signed-off-by: Romain Naour <romain.naour@openwide.fr>
2015-07-31 14:57:27 +02:00
Romain Naour
24ccb6ebc5 build-sys: check for mallinfo
mallinfo is not specified by POSIX or the C standards, therefore
it's not available for all libc libraries (musl).

Add the ability to disable mallinfo statistics.

Fixes:
selinux-util.c: In function ‘mac_selinux_init’:
selinux-util.c:70:25: error: storage size of ‘before_mallinfo’ isn’t known
         struct mallinfo before_mallinfo, after_mallinfo;

Signed-off-by: Romain Naour <romain.naour@openwide.fr>
2015-07-31 14:49:20 +02:00
Tom Gundersen
019c458afe udevd: don't unref worker objects on SIGSTOP/SIGCONT
We should not be receiving these anyway, but let's be correct.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 10:00:52 -04:00
Tom Gundersen
75e930ed64 udevd: warn if we receive SIGCHLD from untracked worker
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 09:52:44 -04:00
Anthony G. Basile
2cf24b3978 libudev: fix commit 3df6350
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 09:49:29 -04:00
Tom Gundersen
f4e9270310 libudev: monitor - set nl_pid when reusing fd in udev_monitor_new_from_netlink_fd
This allows a fd to be created and configured as part of one monitor, to be passed in
to create a second monitor without having to redo any of the configuration.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 09:26:56 -04:00
Tom Gundersen
3df635050b sd-device: get_subsystem - don't complain if a device does not have a subsystem
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 09:25:52 -04:00
Anthony G. Basile
8ba53c912b skip: udevd: manager - move a few global variables into the Manager object
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 09:22:48 -04:00
Anthony G. Basile
252150e181 src/gudev: remove Gobject libudev support.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 08:42:01 -04:00
Anthony G. Basile
1b6370e74b docs: remove gtk-docs.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 08:33:47 -04:00
Anthony G. Basile
9cb37638de rules: import 20-net-ifname.hwdb from upstream.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 08:20:16 -04:00
Marcel Holtmann
3792b2d508 hwdb: Update database of Bluetooth company identifiers
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 08:15:31 -04:00
Kay Sievers
871ed1d9f7 hwdb: update
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 08:14:29 -04:00
Peter Hutterer
af535a4466 hwdb: move a couple of entries to expected sort order
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 08:12:23 -04:00
Peter Hutterer
d5ffc84249 hwdb: add Logitech MX Revolution
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 08:11:13 -04:00
Lennart Poettering
d67ff38fd4 hwdb: update databases from upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 08:10:33 -04:00
Marcel Holtmann
532135e20c hwdb: Update database of Bluetooth company identifiers
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 08:09:55 -04:00
Mario Limonciello
4c3c4bc941 hwdb: add support for Alienware graphics amplifier
Unplugging and plugging in the cable will create various scancodes
on the keyboard controller.

Userspace within X should be able to interact with these to show
interesting messages. Assign them to generic prog1/prog2.

(David: add comment to hwdb explaining that these keycodes are reserved)

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 08:09:21 -04:00
dslul
37f3e3b0f7 keymap: Add Samsung NP350V and NP670Z
typo

keymap: Add Samsung NP350V and NP670Z

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 08:08:42 -04:00
Peter Hutterer
43b1c1c4e8 hwdb: update Logitech's unifying receiver devices
Since 3.19, the devices have the proper vid/pid and the model number in the
name.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 08:08:04 -04:00
Peter Hutterer
a3d396fd36 hwdb: add Logitech TrackMan Marble Wheel USB
DPI is guesswork, no specs found on the web and calculating DPIs on a
trackball is tedious.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 08:07:27 -04:00
Peter Hutterer
62485d6d1c hwdb: add Apple MagicMouse entry 2015-07-20 08:06:45 -04:00
Kay Sievers
deccfc8b10 hwdb: update
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 08:05:47 -04:00
Marcel Holtmann
cead3921ab hwdb: Update database of Bluetooth company identifiers
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 08:05:00 -04:00
Kay Sievers
97fbeb0b45 rules: block - add dasd to whitelist
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 07:52:06 -04:00
Cédric Delmas
224a128b0a Process cciss devices
Do not skip the persistent storage rules for cciss devices

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 07:50:17 -04:00
Bastien Nocera
e172381913 It's moved to the iio-sensor-proxy D-Bus service.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 07:45:23 -04:00
Peter Hutterer
a5cb5f0b4c Revert "hwdb: add a touchpad hwdb"
The main purpose of this hwdb was to tag touchpads that have the physical
trackstick buttons wired to the touchpad (Lenovo Carbon X1 3rd, Lenovo *50
series).  This hwdb is not required on kernels 4.0 and above, the kernel now
re-routes button presses through the trackstick's device node. Userspace does
not need to do anything.

See kernel commit cdd9dc195916ef5644cfac079094c3c1d1616e4c.

This reverts commit 001a247324b44c0e0b8fdba41a6fc66e7465b8b6.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 07:28:05 -04:00
Kay Sievers
b5ac92fb85 rules: remove all power management from udev
It is not udev's task to apply any of these setting that way, or
from udev rules files. Things need to be sortet out in the kernel,
or explicit whitelist can possibly be added to the hardware database.
Until that is sorted out, and general agreement, udev is not
willing to maintain any such lists or power management settings
in general.

"Thanks for digging this out! I thought my Kinesis keyboard got broken
and ordered a new one, only to find out that the new one doesn't work
as well. I'm not sure whether we should start collecting a blacklist
of keyboards which don't work with USB autosuspend, or rather a
whitelist? Or revert this wholesale?"

  https://github.com/systemd/systemd/issues/340

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 07:20:01 -04:00
Alex Crawford
73c2d3cd6d rules: re-add cciss rules
The original commit (1aff206) doesn't explain why these were removed.
This adds them back since they are in fact needed.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 07:17:36 -04:00
Alex Crawford
03638dd242 rules: whitelist xvd* devices
Xen disks need to be whitelisted as well.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 07:17:13 -04:00
Ed Swierk
19d2ceea61 Add /dev/xvd* to 60-persistent-storage whitelist Without this, systemd-udevd does not create persistent storage symlinks for xen block devices.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 07:16:26 -04:00
David Mohr
be3ceedb88 udev: Bring back persistant storage symlinks for bcache
https://bugs.debian.org/787367

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 07:15:57 -04:00
Tom Gundersen
0617e636ab rules: restore block watch after CHANGE events
When processing an event, the watch is disabled, make sure it is restorted after
a CHANGE event has been processed.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 07:14:41 -04:00
Tom Gundersen
ebcaf4b310 rules: fix typo in block watch rule
The intention was to turn this rule from using a blacklist to a whitelist, but
there was a stray '!'.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 07:13:39 -04:00
Anthony G. Basile
c9ed0f0dc6 configure.ac: bump 3.1.2 = upstream 220
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-06-19 12:33:33 -04:00
Anthony G. Basile
5e11fe2da4 Rename mkdir_p -> udev_mkdir_p to avoid symbol collisions.
While usptream doesn't support a static libudev.a, we will try to
do so.  However, mkdir_p() is used in lvm2 and util-linux, so
to avoid the collision, we rename it to udev_mkdir_p().  See:

https://bugs.gentoo.org/show_bug.cgi?id=520450

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-06-18 14:11:59 -04:00
Chris Clayton
52a4d0c0d5 udevd: fix REMOVE handling
The original upstream commit is at

http://cgit.freedesktop.org/systemd/systemd/commit/?id=107f2e2526d476c6cc9b81a690391c111027d641

This was reworked by Chris Clayton for eudev.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-06-18 13:22:13 -04:00
Anthony G. Basile
7061de26fa Revert "udev: don't close std{in,out,err}"
This reverts commit b2399d9b72.

This solves issue #108.  While upstream also reverted this commit,
they did so using functions in terminal-util.c.  We could import
that file and those functions but for such a small commit, its not
worth it.   We may do so at some future time if there are further
gains.  See:

40e749b59b

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-06-18 12:32:17 -04:00
Anthony G. Basile
3c49a3776a configure.ac: bump 3.1.1 = upstream 220
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-06-05 10:35:38 -04:00
Anthony G. Basile
2eba1b8055 80-net-name-slot.rules: restored for issue #117.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-06-02 10:10:45 -04:00
Anthony G. Basile
ebb37f6a47 configure.ac: add --enable-hwdb option. Address issue #111.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-30 08:50:28 -04:00