Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1219928
| From | Alexander Duyck <alexander.duyck@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCHv5 1/7] mm: drop page->slab_page |
| Date | 2015-09-07 07:10 +0200 |
| Message-ID | <q5WQO-4bZ-7@gated-at.bofh.it> (permalink) |
| References | <q4BY5-3Er-3@gated-at.bofh.it> <q4BY6-3Er-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 09/03/2015 05:35 AM, Kirill A. Shutemov wrote:
> Since 8456a648cf44 ("slab: use struct page for slab management") nobody
> uses slab_page field in struct page.
>
> Let's drop it.
>
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> Acked-by: Christoph Lameter <cl@linux.com>
> Acked-by: David Rientjes <rientjes@google.com>
> Acked-by: Vlastimil Babka <vbabka@suse.cz>
> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> Cc: Andi Kleen <ak@linux.intel.com>
> ---
> include/linux/mm_types.h | 1 -
> mm/slab.c | 17 +++--------------
> 2 files changed, 3 insertions(+), 15 deletions(-)
>
> diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
> index 0038ac7466fd..58620ac7f15c 100644
> --- a/include/linux/mm_types.h
> +++ b/include/linux/mm_types.h
> @@ -140,7 +140,6 @@ struct page {
> #endif
> };
>
> - struct slab *slab_page; /* slab fields */
> struct rcu_head rcu_head; /* Used by SLAB
> * when destroying via RCU
> */
> diff --git a/mm/slab.c b/mm/slab.c
> index 200e22412a16..649044f26e5d 100644
> --- a/mm/slab.c
> +++ b/mm/slab.c
> @@ -1888,21 +1888,10 @@ static void slab_destroy(struct kmem_cache *cachep, struct page *page)
>
> freelist = page->freelist;
> slab_destroy_debugcheck(cachep, page);
> - if (unlikely(cachep->flags & SLAB_DESTROY_BY_RCU)) {
> - struct rcu_head *head;
> -
> - /*
> - * RCU free overloads the RCU head over the LRU.
> - * slab_page has been overloeaded over the LRU,
> - * however it is not used from now on so that
> - * we can use it safely.
> - */
> - head = (void *)&page->rcu_head;
> - call_rcu(head, kmem_rcu_free);
> -
> - } else {
> + if (unlikely(cachep->flags & SLAB_DESTROY_BY_RCU))
> + call_rcu(&page->rcu_head, kmem_rcu_free);
> + else
> kmem_freepages(cachep, page);
> - }
>
> /*
> * From now on, we don't use freelist
This second piece looks like it belongs in patch 2, not patch 1 based on
the descriptions.
- Alex
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCHv5 0/7] Fix compound_head() race "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2015-09-03 14:40 +0200
[PATCHv5 6/7] mm: use 'unsigned int' for page order "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2015-09-03 14:40 +0200
Re: [PATCHv5 6/7] mm: use 'unsigned int' for page order Vlastimil Babka <vbabka@suse.cz> - 2015-09-10 13:10 +0200
[PATCHv5 1/7] mm: drop page->slab_page "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2015-09-03 14:40 +0200
Re: [PATCHv5 1/7] mm: drop page->slab_page Alexander Duyck <alexander.duyck@gmail.com> - 2015-09-07 07:10 +0200
Re: [PATCHv5 1/7] mm: drop page->slab_page "Kirill A. Shutemov" <kirill@shutemov.name> - 2015-09-07 14:20 +0200
[PATCHv5 2/7] slub: use page->rcu_head instead of page->lru plus cast "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2015-09-03 14:40 +0200
Re: [PATCHv5 0/7] Fix compound_head() race Andrea Arcangeli <aarcange@redhat.com> - 2015-09-04 15:50 +0200
csiph-web