From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx175.postini.com [74.125.245.175]) by kanga.kvack.org (Postfix) with SMTP id 723F16B0032 for ; Fri, 23 Aug 2013 05:08:32 -0400 (EDT) Received: by mail-ob0-f169.google.com with SMTP id wc20so427591obb.14 for ; Fri, 23 Aug 2013 02:08:31 -0700 (PDT) MIME-Version: 1.0 Date: Fri, 23 Aug 2013 17:08:31 +0800 Message-ID: Subject: Re: unused swap offset / bad page map. From: Hillf Danton Content-Type: multipart/alternative; boundary=047d7bfea09a232a4504e499c0e8 Sender: owner-linux-mm@kvack.org List-ID: To: Dave Jones , Hillf Danton , LKML , Linux-MM --047d7bfea09a232a4504e499c0e8 Content-Type: text/plain; charset=ISO-8859-1 On Fri, Aug 23, 2013 at 11:53 AM, Dave Jones 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 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); -- --047d7bfea09a232a4504e499c0e8 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Fri, Aug 23, 2013 at 11:53 AM, Dave Jones <davej@redhat.com> wrote:
>
>= ; On Fri, Aug 23, 2013 at 11:27:29AM +0800, Hillf Danton wrote:
> =A0= > On Fri, Aug 23, 2013 at 11:21 AM, Dave Jones <davej@redhat.com> wrote:
> =A0> >
> =A0> > I still see the swap_free messages w= ith this applied.
> =A0> >
> =A0> Decremented?
>=
> It actually seems worse, seems I can trigger it even easier now, a= s if
> there's a leak.
>
If leak, add missing swap_free() for a= nother case of reused page.


--- a/mm/memo= ry.c Wed Aug =A07 16:29:3= 4 2013
+++ b/mm/memory.c Fr= i Aug 23 16:46:06 2013
@@ -2655,6 +2655,7 @@ static int do_wp_pag= e(struct mm_struct *
=A0 */
=A0 page_move_anon= _rmap(old_page, vma, address);
=A0 unlock_page(old_page);
+ swap_free(pte_to_swp_entry(orig_pte));
=A0 goto reuse;
=A0 }
= =A0 unlock_page(old_page= );
--

--047d7bfea09a232a4504e499c0e8-- -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org