From: Peter Zijlstra <peterz@infradead.org>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: mingo@kernel.org, akpm@linux-foundation.org, jack@suse.cz,
kirill.shutemov@linux.intel.com, mhocko@suse.com,
mgorman@techsingularity.net, linux-kernel@vger.kernel.org,
Davidlohr Bueso <dbueso@suse.de>
Subject: Re: [PATCH 1/5] locking: Introduce range reader/writer lock
Date: Wed, 29 Mar 2017 10:56:26 +0200 [thread overview]
Message-ID: <20170329085626.rtudonk7bqzoy3vm@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <1488863010-13028-2-git-send-email-dave@stgolabs.net>
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.
next prev parent reply other threads:[~2017-03-29 8:56 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-07 5:03 [PATCH 0/5] locking " Davidlohr Bueso
2017-03-07 5:03 ` [PATCH 1/5] locking: " Davidlohr Bueso
2017-03-09 11:03 ` Jan Kara
2017-03-28 10:00 ` Laurent Dufour
2017-03-28 16:39 ` Davidlohr Bueso
2017-03-28 16:58 ` Kirill A. Shutemov
2017-03-29 8:38 ` Laurent Dufour
2017-03-29 15:31 ` Davidlohr Bueso
2017-03-29 15:40 ` Kirill A. Shutemov
2017-03-29 16:10 ` Davidlohr Bueso
2017-04-03 14:19 ` Laurent Dufour
2017-04-03 15:26 ` Davidlohr Bueso
2017-04-03 16:06 ` Jan Kara
2017-04-04 15:31 ` Davidlohr Bueso
2017-03-29 8:56 ` Peter Zijlstra [this message]
2017-03-29 15:12 ` Davidlohr Bueso
2017-03-29 8:59 ` Peter Zijlstra
2017-03-29 9:08 ` Peter Zijlstra
2017-03-29 15:05 ` Davidlohr Bueso
2017-03-29 9:11 ` Peter Zijlstra
2017-03-29 9:44 ` Peter Zijlstra
2017-03-29 10:35 ` Peter Zijlstra
2017-03-29 10:49 ` Peter Zijlstra
2017-03-29 15:14 ` Davidlohr Bueso
2017-03-30 14:56 ` Laurent Dufour
2017-03-30 17:13 ` Davidlohr Bueso
2017-03-07 5:03 ` [PATCH 2/5] locking/locktorture: Fix rwsem reader_delay Davidlohr Bueso
2017-03-07 5:03 ` [PATCH 3/5] locking/locktorture: Fix num reader/writer corner cases Davidlohr Bueso
2017-03-07 5:03 ` [PATCH 4/5] locking/locktorture: Support range rwlocks Davidlohr Bueso
2017-03-07 5:03 ` [PATCH 5/5] staging/lustre: Use generic range rwlock Davidlohr Bueso
2017-03-07 6:05 ` Oleg Drokin
2017-03-08 15:02 ` Davidlohr Bueso
2017-03-09 8:56 ` kbuild test robot
2017-03-09 14:40 ` kbuild test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170329085626.rtudonk7bqzoy3vm@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=dave@stgolabs.net \
--cc=dbueso@suse.de \
--cc=jack@suse.cz \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@suse.com \
--cc=mingo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®