[lkml]   [2004]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: To kunmap_atomic or not to kunmap_atomic ?
On Thu, 1 Apr 2004, Zoltan Menyhart wrote:
> I can see a couple of functions, like
> static inline struct mm_struct * ptep_to_mm(pte_t * ptep)
> {
> struct page * page = kmap_atomic_to_page(ptep);
> return (struct mm_struct *) page->mapping;
> }
> in "rmap.?" without invoking "kunmap_atomic()".
> Is it intentional?
> What if for an architecture "kunmap_atomic()" is not a no-op ?

Amusing misunderstanding. Take a look at kmap_atomic_to_page
in arch/i386/mm/highmem.c: it doesn't _do_ a kmap_atomic, it
translates the virtual address already supplied by kmap_atomic
to the address of the struct page of the physical page backing
that virtual address. So, in the case of try_to_unmap_one, it
operates on the virtual address supplied by rmap_ptep_map
(which does do a kmap_atomic), and at the end there's an
rmap_ptep_unmap (which does the rmap_ptep_unmap).


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:02    [W:0.029 / U:3.768 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site