Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1321804 > unrolled thread
| Started by | Vlastimil Babka <vbabka@suse.cz> |
|---|---|
| First post | 2016-01-29 15:50 +0100 |
| Last post | 2016-01-29 16:00 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 4/5] mm: Use radix_tree_iter_retry() Vlastimil Babka <vbabka@suse.cz> - 2016-01-29 15:50 +0100
Re: [PATCH 4/5] mm: Use radix_tree_iter_retry() Matthew Wilcox <willy@linux.intel.com> - 2016-01-29 16:00 +0100
| From | Vlastimil Babka <vbabka@suse.cz> |
|---|---|
| Date | 2016-01-29 15:50 +0100 |
| Subject | Re: [PATCH 4/5] mm: Use radix_tree_iter_retry() |
| Message-ID | <qWix5-4ym-25@gated-at.bofh.it> |
On 01/27/2016 10:17 PM, Matthew Wilcox wrote:
> From: Matthew Wilcox <willy@linux.intel.com>
>
> Instead of a 'goto restart', we can now use radix_tree_iter_retry()
> to restart from our current position. This will make a difference
> when there are more ways to happen across an indirect pointer. And it
> eliminates some confusing gotos.
>
> Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
[...]
> diff --git a/mm/shmem.c b/mm/shmem.c
> index fa2ceb2d2655..6ec14b70d82d 100644
> --- a/mm/shmem.c
> +++ b/mm/shmem.c
> @@ -388,8 +388,10 @@ restart:
> * don't need to reset the counter, nor do we risk infinite
> * restarts.
> */
> - if (radix_tree_deref_retry(page))
> - goto restart;
> + if (radix_tree_deref_retry(page)) {
> + slot = radix_tree_iter_retry(&iter);
> + continue;
> + }
>
> if (radix_tree_exceptional_entry(page))
> swapped++;
This should be applied on top. There are no restarts anymore.
----8<----
From 3b0bdd370b57fb6d83b213e140cd1fb0e8962af8 Mon Sep 17 00:00:00 2001
From: Vlastimil Babka <vbabka@suse.cz>
Date: Fri, 29 Jan 2016 15:41:31 +0100
Subject: [PATCH] mm: Use radix_tree_iter_retry()-fix
Remove now-obsolete-and-misleading comment.
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
---
mm/shmem.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/mm/shmem.c b/mm/shmem.c
index 8f89abd4eaee..4d758938340c 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -382,11 +382,6 @@ unsigned long shmem_partial_swap_usage(struct address_space *mapping,
page = radix_tree_deref_slot(slot);
- /*
- * This should only be possible to happen at index 0, so we
- * don't need to reset the counter, nor do we risk infinite
- * restarts.
- */
if (radix_tree_deref_retry(page)) {
slot = radix_tree_iter_retry(&iter);
continue;
--
2.7.0
[toc] | [next] | [standalone]
| From | Matthew Wilcox <willy@linux.intel.com> |
|---|---|
| Date | 2016-01-29 16:00 +0100 |
| Message-ID | <qWiGK-4DM-9@gated-at.bofh.it> |
| In reply to | #1321804 |
On Fri, Jan 29, 2016 at 03:45:59PM +0100, Vlastimil Babka wrote:
> This should be applied on top. There are no restarts anymore.
Quite right. Sorry I missed the comment.
Acked-by: Matthwe Wilcox <willy@linux.intel.com>
> ----8<----
> >From 3b0bdd370b57fb6d83b213e140cd1fb0e8962af8 Mon Sep 17 00:00:00 2001
> From: Vlastimil Babka <vbabka@suse.cz>
> Date: Fri, 29 Jan 2016 15:41:31 +0100
> Subject: [PATCH] mm: Use radix_tree_iter_retry()-fix
>
> Remove now-obsolete-and-misleading comment.
>
> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
> ---
> mm/shmem.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/mm/shmem.c b/mm/shmem.c
> index 8f89abd4eaee..4d758938340c 100644
> --- a/mm/shmem.c
> +++ b/mm/shmem.c
> @@ -382,11 +382,6 @@ unsigned long shmem_partial_swap_usage(struct address_space *mapping,
>
> page = radix_tree_deref_slot(slot);
>
> - /*
> - * This should only be possible to happen at index 0, so we
> - * don't need to reset the counter, nor do we risk infinite
> - * restarts.
> - */
> if (radix_tree_deref_retry(page)) {
> slot = radix_tree_iter_retry(&iter);
> continue;
> --
> 2.7.0
>
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web