Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1279665
| From | Mika Penttilä <mika.penttila@nextfour.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v5 01/12] mm: support madvise(MADV_FREE) |
| Date | 2015-11-30 09:30 +0100 |
| Message-ID | <qAs0p-17U-5@gated-at.bofh.it> (permalink) |
| References | <qAqrD-8vQ-3@gated-at.bofh.it> <qAqrE-8vQ-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> + * If pmd isn't transhuge but the page is THP and
> + * is owned by only this process, split it and
> + * deactivate all pages.
> + */
> + if (PageTransCompound(page)) {
> + if (page_mapcount(page) != 1)
> + goto out;
> + get_page(page);
> + if (!trylock_page(page)) {
> + put_page(page);
> + goto out;
> + }
> + pte_unmap_unlock(orig_pte, ptl);
> + if (split_huge_page(page)) {
> + unlock_page(page);
> + put_page(page);
> + pte_offset_map_lock(mm, pmd, addr, &ptl);
> + goto out;
> + }
> + pte = pte_offset_map_lock(mm, pmd, addr, &ptl);
> + pte--;
> + addr -= PAGE_SIZE;
> + continue;
> + }
looks like this leaks page count if split_huge_page() is succesfull
(returns zero).
--Mika
--
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
[PATCH v5 00/12] MADV_FREE support Minchan Kim <minchan@kernel.org> - 2015-11-30 07:50 +0100
[PATCH v5 01/12] mm: support madvise(MADV_FREE) Minchan Kim <minchan@kernel.org> - 2015-11-30 07:50 +0100
Re: [PATCH v5 01/12] mm: support madvise(MADV_FREE) Mika Penttilä <mika.penttila@nextfour.com> - 2015-11-30 09:30 +0100
Re: [PATCH v5 01/12] mm: support madvise(MADV_FREE) Minchan Kim <minchan@kernel.org> - 2015-11-30 10:30 +0100
[PATCH v5 04/12] mm: free swp_entry in madvise_free Minchan Kim <minchan@kernel.org> - 2015-11-30 07:50 +0100
[PATCH v5 02/12] mm: define MADV_FREE for some arches Minchan Kim <minchan@kernel.org> - 2015-11-30 07:50 +0100
[PATCH v5 03/12] arch: uapi: asm: mman.h: Let MADV_FREE have same value for all architectures Minchan Kim <minchan@kernel.org> - 2015-11-30 07:50 +0100
csiph-web