login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
April
»
24
Re: [PATCH] lazy freeing of memory through MADV_FREE
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From:
Nick Piggin <nickpiggin@...>
To: Rik van Riel <riel@...>
Cc: Andrew Morton <akpm@...>, linux-kernel <linux-kernel@...>, linux-mm <linux-mm@...>, shak <dshaks@...>, <jakub@...>, <drepper@...>
Subject:
Re: [PATCH] lazy freeing of memory through MADV_FREE
Date: Monday, April 23, 2007 - 10:16 pm
Rik van Riel wrote:
quoted text
> This should fix the MADV_FREE code for PPC's hashed tlb. > > Signed-off-by: Rik van Riel <riel@redhat.com> > --- > > Nick Piggin wrote: > >>> Nick Piggin wrote: >>> >>>>> 3) because of this, we can treat any such accesses as >>>>> happening simultaneously with the MADV_FREE and >>>>> as illegal, aka undefined behaviour territory and >>>>> we do not need to worry about them >>>> >>>> >>>> >>>> Yes, but I'm wondering if it is legal in all architectures. >>> >>> >>> >>> It's similar to trying to access memory during an munmap. >>> >>> You may be able to for a short time, but it'll come back to >>> haunt you. >> >> >> The question is whether the architecture specific tlb >> flushing code will break or not. > > > I guess we'll need to call tlb_remove_tlb_entry() inside the > MADV_FREE code to keep powerpc happy. > > Thanks for pointing this one out. > >>> Even then we do. Each invocation of zap_pte_range() only touches >>> one page table page, and it flushes the TLB before releasing the >>> page table lock. >> >> >> What kernel are you looking at? -rc7 and rc6-mm1 don't, AFAIKS. > > > Oh dear. I see it now... > > The tlb end things inside zap_pte_range() are actually > noops and the actual tlb flush only happens inside > zap_page_range(). > > I guess the fact that munmap gets the mmap_sem for > writing should save us, though...
What about an unmap_mapping_range, or another MADV_FREE or MADV_DONTNEED?
quoted text
> > > ------------------------------------------------------------------------ > > --- linux-2.6.20.x86_64/mm/memory.c.noppc 2007-04-23 21:50:09.000000000 -0400 > +++ linux-2.6.20.x86_64/mm/memory.c 2007-04-23 21:48:59.000000000 -0400 > @@ -679,6 +679,7 @@ static unsigned long zap_pte_range(struc > } > ptep_test_and_clear_dirty(vma, addr, pte); > ptep_test_and_clear_young(vma, addr, pte); > + tlb_remove_tlb_entry(tlb, pte, addr); > SetPageLazyFree(page); > if (PageActive(page)) > deactivate_tail_page(page);
-- SUSE Labs, Novell Inc. -
unsubscribe notice
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/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[PATCH] lazy freeing of memory through MADV_FREE
, Rik van Riel
, (Tue Apr 17, 3:15 am)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Andrew Morton
, (Sun Apr 22, 4:18 am)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Christoph Hellwig
, (Sun Apr 22, 5:16 am)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Ulrich Drepper
, (Sun Apr 22, 12:55 pm)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Andrew Morton
, (Fri Apr 20, 4:57 pm)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Rik van Riel
, (Fri Apr 20, 5:38 pm)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Hugh Dickins
, (Sat Apr 21, 3:24 am)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Rik van Riel
, (Sat Apr 21, 2:06 pm)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Andrew Morton
, (Fri Apr 20, 6:06 pm)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Rik van Riel
, (Fri Apr 20, 7:52 pm)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Nick Piggin
, (Sat Apr 21, 10:36 pm)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Rik van Riel
, (Mon Apr 23, 12:28 am)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Rik van Riel
, (Sun Apr 22, 2:31 am)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Nick Piggin
, (Sun Apr 22, 8:16 pm)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Rik van Riel
, (Sun Apr 22, 11:53 pm)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Nick Piggin
, (Sun Apr 22, 11:58 pm)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Nick Piggin
, (Mon Apr 23, 6:07 am)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Rik van Riel
, (Mon Apr 23, 6:12 am)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Rik van Riel
, (Sun Apr 22, 11:59 pm)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Rik van Riel
, (Mon Apr 23, 5:20 am)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Rik van Riel
, (Mon Apr 23, 7:45 am)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Nick Piggin
, (Mon Apr 23, 6:21 am)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Jakub Jelinek
, (Mon Apr 23, 6:44 am)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Rik van Riel
, (Mon Apr 23, 6:31 am)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Nick Piggin
, (Mon Apr 23, 6:35 am)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Rik van Riel
, (Mon Apr 23, 10:53 pm)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Andrew Morton
, (Mon Apr 23, 11:08 pm)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Rik van Riel
, (Mon Apr 23, 6:44 am)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Nick Piggin
, (Mon Apr 23, 9:15 pm)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Rik van Riel
, (Mon Apr 23, 9:58 pm)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Paul Mackerras
, (Tue Apr 24, 12:42 am)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Rik van Riel
, (Tue Apr 24, 1:13 am)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Nick Piggin
, (Mon Apr 23, 10:16 pm)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Nick Piggin
, (Sat Apr 21, 10:50 pm)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Jakub Jelinek
, (Sat Apr 21, 3:12 am)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Nick Piggin
, (Mon Apr 23, 12:36 am)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Eric Dumazet
, (Fri Apr 20, 8:48 pm)
Re: [PATCH] lazy freeing of memory through MADV_FREE
, Rik van Riel
, (Fri Apr 20, 11:58 pm)
Re: [PATCH] lazy freeing of memory through MADV_FREE 2/2
, Rik van Riel
, (Thu Apr 19, 5:15 pm)
Re: [PATCH] lazy freeing of memory through MADV_FREE 2/2
, Andrew Morton
, (Fri Apr 20, 5:03 pm)
Re: [PATCH] lazy freeing of memory through MADV_FREE 2/2
, Ulrich Drepper
, (Fri Apr 20, 5:24 pm)
Re: [PATCH] lazy freeing of memory through MADV_FREE 2/2
, Hugh Dickins
, (Sat Apr 21, 3:37 am)
Re: [PATCH] lazy freeing of memory through MADV_FREE 2/2
, Ulrich Drepper
, (Sat Apr 21, 12:32 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
James Bottomley
Re: Integration of SCST in the mainstream Linux kernel
David Miller
Slow DOWN, please!!!
Greg Kroah-Hartman
[PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO
Jens Axboe
[PATCH 10/10] Add CONFIG_DEBUG_SG sg validation
linux-netdev
:
Arjan van de Ven
Re: [GIT]: Networking
Gerrit Renker
[PATCH 0/37] dccp: Feature negotiation - last call for comments
Jarek Poplawski
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Frans Pop
svc: failed to register lockdv1 RPC service (errno 97).
git
:
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
0 users
and
477 guests
online.
Syndicate