From: Davidlohr Bueso <dave@stgolabs.net>
To: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Cc: linux-mm@kvack.org, akpm@linux-foundation.org,
Jan Kara <jack@suse.cz>,
"Kirill A . Shutemov" <kirill@shutemov.name>,
Michal Hocko <mhocko@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Mel Gorman <mgorman@techsingularity.net>,
Andi Kleen <andi@firstfloor.org>,
haren@linux.vnet.ibm.com, aneesh.kumar@linux.vnet.ibm.com,
khandual@linux.vnet.ibm.com, paulmck@linux.vnet.ibm.com,
linux-kernel@vger.kernel.org
Subject: Re: [RFC v2 01/10] mm: Deactivate mmap_sem assert
Date: Wed, 31 May 2017 08:40:10 -0700 [thread overview]
Message-ID: <20170531154010.GA28615@linux-80c1.suse> (raw)
In-Reply-To: <1495624801-8063-2-git-send-email-ldufour@linux.vnet.ibm.com>
Hi Laurent!
On Wed, 24 May 2017, Laurent Dufour wrote:
>When mmap_sem will be moved to a range lock, some assertion done in
>the code will have to be reviewed to work with the range locking as
>well.
>
>This patch disables these assertions for the moment but it has be
>reviewed later once the range locking API will provide the dedicated
>services.
Lets not do this; we should _at least_ provide the current checks
we already have. The following should be a (slower) equivalent once
we have the interval_tree_iter_first() optimization sorted out.
int range_is_locked(struct range_lock_tree *tree, struct range_lock *lock)
{
unsigned long flags;
struct interval_tree_node *node;
spin_lock_irqsave(&tree->lock, flags);
node = interval_tree_iter_first(&tree->root, lock->node.start,
lock->node.last);
spin_unlock_irqrestore(&tree->lock, flags);
return node != NULL;
}
EXPORT_SYMBOL_GPL(range_is_locked);
Thanks,
Davidlohr
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Davidlohr Bueso <dave@stgolabs.net>
To: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Cc: linux-mm@kvack.org, akpm@linux-foundation.org,
Jan Kara <jack@suse.cz>,
"Kirill A . Shutemov" <kirill@shutemov.name>,
Michal Hocko <mhocko@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Mel Gorman <mgorman@techsingularity.net>,
Andi Kleen <andi@firstfloor.org>,
haren@linux.vnet.ibm.com, aneesh.kumar@linux.vnet.ibm.com,
khandual@linux.vnet.ibm.com, paulmck@linux.vnet.ibm.com,
linux-kernel@vger.kernel.org
Subject: Re: [RFC v2 01/10] mm: Deactivate mmap_sem assert
Date: Wed, 31 May 2017 08:40:10 -0700 [thread overview]
Message-ID: <20170531154010.GA28615@linux-80c1.suse> (raw)
In-Reply-To: <1495624801-8063-2-git-send-email-ldufour@linux.vnet.ibm.com>
Hi Laurent!
On Wed, 24 May 2017, Laurent Dufour wrote:
>When mmap_sem will be moved to a range lock, some assertion done in
>the code will have to be reviewed to work with the range locking as
>well.
>
>This patch disables these assertions for the moment but it has be
>reviewed later once the range locking API will provide the dedicated
>services.
Lets not do this; we should _at least_ provide the current checks
we already have. The following should be a (slower) equivalent once
we have the interval_tree_iter_first() optimization sorted out.
int range_is_locked(struct range_lock_tree *tree, struct range_lock *lock)
{
unsigned long flags;
struct interval_tree_node *node;
spin_lock_irqsave(&tree->lock, flags);
node = interval_tree_iter_first(&tree->root, lock->node.start,
lock->node.last);
spin_unlock_irqrestore(&tree->lock, flags);
return node != NULL;
}
EXPORT_SYMBOL_GPL(range_is_locked);
Thanks,
Davidlohr
next prev parent reply other threads:[~2017-05-31 15:40 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-24 11:19 [RFC v2 00/10] Replace mmap_sem by a range lock Laurent Dufour
2017-05-24 11:19 ` Laurent Dufour
2017-05-24 11:19 ` [RFC v2 01/10] mm: Deactivate mmap_sem assert Laurent Dufour
2017-05-24 11:19 ` Laurent Dufour
2017-05-31 15:40 ` Davidlohr Bueso [this message]
2017-05-31 15:40 ` Davidlohr Bueso
2017-05-24 11:19 ` [RFC v2 02/10] mm: Remove nest locking operation with mmap_sem Laurent Dufour
2017-05-24 11:19 ` Laurent Dufour
2017-05-31 15:58 ` Davidlohr Bueso
2017-05-31 15:58 ` Davidlohr Bueso
2017-05-24 11:19 ` [RFC v2 03/10] mm: Add a range parameter to the vm_fault structure Laurent Dufour
2017-05-24 11:19 ` Laurent Dufour
2017-05-24 11:19 ` [RFC v2 04/10] mm: Handle range lock field when collapsing huge pages Laurent Dufour
2017-05-24 11:19 ` Laurent Dufour
2017-05-24 11:19 ` [RFC v2 05/10] mm: Add a range lock parameter to userfaultfd_remove() Laurent Dufour
2017-05-24 11:19 ` Laurent Dufour
2017-05-24 11:19 ` [RFC v2 06/10] mm: Add a range lock parameter to lock_page_or_retry() Laurent Dufour
2017-05-24 11:19 ` Laurent Dufour
2017-05-24 11:19 ` [RFC v2 07/10] mm: Add a range lock parameter to GUP() and handle_page_fault() Laurent Dufour
2017-05-24 11:19 ` Laurent Dufour
2017-05-24 11:19 ` [RFC v2 08/10] mm: Define mem range lock operations Laurent Dufour
2017-05-24 11:19 ` Laurent Dufour
2017-05-24 11:20 ` [RFC v2 09/10] mm: Change mmap_sem to range lock Laurent Dufour
2017-05-24 11:20 ` Laurent Dufour
2017-05-24 11:20 ` [RFC v2 10/10] mm: Introduce CONFIG_MEM_RANGE_LOCK Laurent Dufour
2017-05-24 11:20 ` Laurent Dufour
2017-05-31 16:19 ` Davidlohr Bueso
2017-05-31 16:19 ` Davidlohr Bueso
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=20170531154010.GA28615@linux-80c1.suse \
--to=dave@stgolabs.net \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=haren@linux.vnet.ibm.com \
--cc=jack@suse.cz \
--cc=khandual@linux.vnet.ibm.com \
--cc=kirill@shutemov.name \
--cc=ldufour@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.