Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1268640
| From | Minchan Kim <minchan@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3 01/17] mm: support madvise(MADV_FREE) |
| Date | 2015-11-13 07:20 +0100 |
| Message-ID | <qufSi-2Lr-3@gated-at.bofh.it> (permalink) |
| References | <qtRPX-49d-3@gated-at.bofh.it> <qtRPZ-49d-43@gated-at.bofh.it> <qtS9l-4gx-13@gated-at.bofh.it> <qtSCl-4HV-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Nov 12, 2015 at 12:21:30AM -0500, Daniel Micay wrote:
> > I also think that the kernel should commit to either zeroing the page
> > or leaving it unchanged in response to MADV_FREE (even if the decision
> > of which to do is made later on). I think that your patch series does
> > this, but only after a few of the patches are applied (the swap entry
> > freeing), and I think that it should be a real guaranteed part of the
> > semantics and maybe have a test case.
>
> This would be a good thing to test because it would be required to add
> MADV_FREE_UNDO down the road. It would mean the same semantics as the
> MEM_RESET and MEM_RESET_UNDO features on Windows, and there's probably
> value in that for the sake of migrating existing software too.
So, do you mean that we could implement MADV_FREE_UNDO with "read"
opearation("just access bit marking) easily in future?
If so, it would be good reason to change MADV_FREE from dirty bit to
access bit. Okay, I will look at that.
>
> For one example, it could be dropped into Firefox:
>
> https://dxr.mozilla.org/mozilla-central/source/memory/volatile/VolatileBufferWindows.cpp
>
> And in Chromium:
>
> https://code.google.com/p/chromium/codesearch#chromium/src/base/memory/discardable_shared_memory.cc
>
> Worth noting that both also support the API for pinning/unpinning that's
> used by Android's ashmem too. Linux really needs a feature like this for
> caches. Firefox simply doesn't drop the memory at all on Linux right now:
>
> https://dxr.mozilla.org/mozilla-central/source/memory/volatile/VolatileBufferFallback.cpp
>
> (Lock == pin, Unlock == unpin)
>
> For reference:
>
> https://msdn.microsoft.com/en-us/library/windows/desktop/aa366887(v=vs.85).aspx
>
--
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 v3 00/17] MADFV_FREE support Minchan Kim <minchan@kernel.org> - 2015-11-12 05:40 +0100
[PATCH v3 08/17] x86: add pmd_[dirty|mkclean] for THP Minchan Kim <minchan@kernel.org> - 2015-11-12 05:40 +0100
[PATCH v3 01/17] mm: support madvise(MADV_FREE) Minchan Kim <minchan@kernel.org> - 2015-11-12 05:40 +0100
Re: [PATCH v3 01/17] mm: support madvise(MADV_FREE) Andy Lutomirski <luto@amacapital.net> - 2015-11-12 06:00 +0100
Re: [PATCH v3 01/17] mm: support madvise(MADV_FREE) Daniel Micay <danielmicay@gmail.com> - 2015-11-12 06:30 +0100
Re: [PATCH v3 01/17] mm: support madvise(MADV_FREE) Minchan Kim <minchan@kernel.org> - 2015-11-13 07:20 +0100
Re: [PATCH v3 01/17] mm: support madvise(MADV_FREE) Daniel Micay <danielmicay@gmail.com> - 2015-11-13 07:20 +0100
Re: [PATCH v3 01/17] mm: support madvise(MADV_FREE) Minchan Kim <minchan@kernel.org> - 2015-11-13 07:40 +0100
Re: [PATCH v3 01/17] mm: support madvise(MADV_FREE) Daniel Micay <danielmicay@gmail.com> - 2015-11-13 07:50 +0100
Re: [PATCH v3 01/17] mm: support madvise(MADV_FREE) Minchan Kim <minchan@kernel.org> - 2015-11-13 08:10 +0100
Re: [PATCH v3 01/17] mm: support madvise(MADV_FREE) Daniel Micay <danielmicay@gmail.com> - 2015-11-13 09:20 +0100
Re: [PATCH v3 01/17] mm: support madvise(MADV_FREE) Andy Lutomirski <luto@amacapital.net> - 2015-11-13 20:50 +0100
Re: [PATCH v3 01/17] mm: support madvise(MADV_FREE) Minchan Kim <minchan@kernel.org> - 2015-11-16 03:20 +0100
Re: [PATCH v3 01/17] mm: support madvise(MADV_FREE) yalin wang <yalin.wang2010@gmail.com> - 2015-11-16 04:20 +0100
Re: [PATCH v3 01/17] mm: support madvise(MADV_FREE) "Kirill A. Shutemov" <kirill@shutemov.name> - 2015-11-12 12:30 +0100
Re: [PATCH v3 01/17] mm: support madvise(MADV_FREE) Minchan Kim <minchan@kernel.org> - 2015-11-13 07:20 +0100
[PATCH v3 11/17] arm: add pmd_mkclean for THP Minchan Kim <minchan@kernel.org> - 2015-11-12 05:40 +0100
csiph-web