lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 29 Mar 2017 10:56:26 +0200 From: Peter Zijlstra <peterz@...radead.org> To: Davidlohr Bueso <dave@...olabs.net> Cc: mingo@...nel.org, akpm@...ux-foundation.org, jack@...e.cz, kirill.shutemov@...ux.intel.com, mhocko@...e.com, mgorman@...hsingularity.net, linux-kernel@...r.kernel.org, Davidlohr Bueso <dbueso@...e.de> Subject: Re: [PATCH 1/5] locking: Introduce range reader/writer lock On Mon, Mar 06, 2017 at 09:03:26PM -0800, Davidlohr Bueso wrote: > diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig > index 88e01e08e279..e4d9eadd2c47 100644 > --- a/drivers/gpu/drm/Kconfig > +++ b/drivers/gpu/drm/Kconfig > @@ -154,7 +154,6 @@ config DRM_RADEON > select HWMON > select BACKLIGHT_CLASS_DEVICE > select BACKLIGHT_LCD_SUPPORT > - select INTERVAL_TREE > help > Choose this option if you have an ATI Radeon graphics card. There > are both PCI and AGP versions. You don't need to choose this to > @@ -174,7 +173,6 @@ config DRM_AMDGPU > select HWMON > select BACKLIGHT_CLASS_DEVICE > select BACKLIGHT_LCD_SUPPORT > - select INTERVAL_TREE > help > Choose this option if you have a recent AMD Radeon graphics card. > > diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig > index 183f5dc1c3f2..8a9154550f46 100644 > --- a/drivers/gpu/drm/i915/Kconfig > +++ b/drivers/gpu/drm/i915/Kconfig > @@ -3,7 +3,6 @@ config DRM_I915 > depends on DRM > depends on X86 && PCI > select INTEL_GTT > - select INTERVAL_TREE > # we need shmfs for the swappable backing store, and in particular > # the shmem_readpage() which depends upon tmpfs > select SHMEM I presume this is part of making INTERVAL_TREE unconditional; should be a separate patch, no? > +/* > + * The largest range will span [0,RANGE_RWLOCK_INFINITY]. > + */ > +#define RANGE_RWLOCK_INFINITY (~0UL - 1) That's a strange limit, what's wrong with ~0UL ? > + > +struct range_rwlock { > + struct interval_tree_node node; > + struct task_struct *task; > + /* Number of ranges which are blocking acquisition of the lock */ > + unsigned int blocking_ranges; > + bool reader; > +}; Hate the name; our rwlock is a spinlock, therefore this thing suggests it is too. Also, no bool in structures.
Powered by blists - more mailing lists