On Fri, Aug 23, 2013 at 11:53 AM, Dave Jones <davej@xxxxxxxxxx> wrote:
>
> On Fri, Aug 23, 2013 at 11:27:29AM +0800, Hillf Danton wrote:
> > On Fri, Aug 23, 2013 at 11:21 AM, Dave Jones <davej@xxxxxxxxxx> wrote:
> > >
> > > I still see the swap_free messages with this applied.
> > >
> > Decremented?
>
> It actually seems worse, seems I can trigger it even easier now, as if
> there's a leak.
>
>
> On Fri, Aug 23, 2013 at 11:27:29AM +0800, Hillf Danton wrote:
> > On Fri, Aug 23, 2013 at 11:21 AM, Dave Jones <davej@xxxxxxxxxx> wrote:
> > >
> > > I still see the swap_free messages with this applied.
> > >
> > Decremented?
>
> It actually seems worse, seems I can trigger it even easier now, as if
> there's a leak.
>
If leak, add missing swap_free() for another case of reused page.
--- a/mm/memory.c Wed Aug 7 16:29:34 2013
+++ b/mm/memory.c Fri Aug 23 16:46:06 2013
@@ -2655,6 +2655,7 @@ static int do_wp_page(struct mm_struct *
*/
page_move_anon_rmap(old_page, vma, address);
unlock_page(old_page);
+ swap_free(pte_to_swp_entry(orig_pte));
goto reuse;
}
unlock_page(old_page);
--