------- Comment #3 from wuzhangjin at gmail dot com 2009-11-25 01:08 -------
(In reply to comment #2)
> (In reply to comment #1)
> > Can you provide the preprocessed source?
> >
>
> Sorry, the preprocessed source is too big, I can not paste it as comment,
> where
> can i attach it?
>
Here is the function relative part:
static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma,
enum ttu_flags flags)
{
struct mm_struct *mm = vma->vm_mm;
unsigned long address;
pte_t *pte;
pte_t pteval;
spinlock_t *ptl;
int ret = 1;
address = vma_address(page, vma);
if (address == -14)
goto out;
pte = page_check_address(page, mm, address, &ptl, 0);
if (!pte)
goto out;
if (!(flags & TTU_IGNORE_MLOCK)) {
if (vma->vm_flags & 0x00002000) {
ret = 3;
goto out_unmap;
}
}
if (!(flags & TTU_IGNORE_ACCESS)) {
if (({ int __young; __young = ({ pte_t __pte = *(pte); int r = 1; if
(!pte_young(__pte)) r = 0; else set_pte((pte), pte_mkold(__pte)); r; }); if
(__young) local_flush_tlb_page(vma, address); __young; })) {
ret = 2;
goto out_unmap;
}
}
flush_cache_page(vma, address, ({ struct page *__pg = (page); int __sec =
page_to_section(__pg); (unsigned long)(__pg -
__section_mem_map_addr(__nr_to_section(__sec))); }));
pteval = ({ pte_t __pte; __pte = ({ pte_t __pte = *(pte);
pte_clear(((vma)->vm_mm), (address), (pte)); __pte; });
local_flush_tlb_page(vma, address); __pte; });
if (pte_dirty(pteval))
set_page_dirty(page);
do { unsigned long _rss = (((mm)->_file_rss) + ((mm)->_anon_rss)); if
((mm)->hiwater_rss < _rss) (mm)->hiwater_rss = _rss; } while (0);
if (PageHWPoison(page) && !(flags & TTU_IGNORE_HWPOISON)) {
if (PageAnon(page))
(mm)->_anon_rss--;
else
(mm)->_file_rss--;
set_pte(pte, swp_entry_to_pte(make_hwpoison_entry(page)))
;
} else if (PageAnon(page)) {
swp_entry_t entry = { .val = ((page)->private) };
if (PageSwapCache(page)) {
swap_duplicate(entry);
if (list_empty(&mm->mmlist)) {
do { do { do { (__current_thread_info->preempt_count) += (1); } while (0);
__asm__ __volatile__("": : :"memory"); } while (0); (void)0;
(void)(&mmlist_lock); } while (0);
if (list_empty(&mm->mmlist))
list_add(&mm->mmlist, &init_mm.mmlist);
do { do { do { __asm__ __volatile__("": : :"memory"); do {
(__current_thread_info->preempt_count) -= (1); } while (0); } while (0);
__asm__ __volatile__("": : :"memory"); do { if
(__builtin_expect(!!(test_ti_thread_flag(__current_thread_info, 2)), 0))
preempt_schedule(); } while (0); } while (0); (void)0; (void)(&mmlist_lock); }
while (0);
}
(mm)->_anon_rss--;
} else if (0) {
__BUG_ON((unsigned long)(((flags) & TTU_ACTION_MASK) != TTU_MIGRATION));
entry = swp_entry(0, 0);
}
set_pte(pte, swp_entry_to_pte(entry));
__BUG_ON((unsigned long)(pte_file(*pte)));
} else if (0 && (((flags) & TTU_ACTION_MASK) == TTU_MIGRATION)) {
swp_entry_t entry;
entry = swp_entry(0, 0);
set_pte(pte, swp_entry_to_pte(entry));
} else
(mm)->_file_rss--;
page_remove_rmap(page);
put_page(page);
out_unmap:
do { do { do { do { __asm__ __volatile__("": : :"memory"); do {
(__current_thread_info->preempt_count) -= (1); } while (0); } while (0);
__asm__ __volatile__("": : :"memory"); do { if
(__builtin_expect(!!(test_ti_thread_flag(__current_thread_info, 2)), 0))
preempt_schedule(); } while (0); } while (0); (void)0; (void)(ptl); } while
(0); ((void)(pte)); } while (0);
out:
return ret;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42164