From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754554Ab3HWDVk (ORCPT ); Thu, 22 Aug 2013 23:21:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:13035 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754501Ab3HWDVj (ORCPT ); Thu, 22 Aug 2013 23:21:39 -0400 Date: Thu, 22 Aug 2013 23:21:27 -0400 From: Dave Jones To: Hillf Danton Cc: Linux-MM , Linux Kernel Subject: Re: unused swap offset / bad page map. Message-ID: <20130823032127.GA5098@redhat.com> Mail-Followup-To: Dave Jones , Hillf Danton , Linux-MM , Linux Kernel References: <20130807055157.GA32278@redhat.com> <20130807153030.GA25515@redhat.com> <20130819231836.GD14369@redhat.com> <20130821204901.GA19802@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 22, 2013 at 11:21:28AM +0800, Hillf Danton wrote: > On Thu, Aug 22, 2013 at 4:49 AM, Dave Jones wrote: > > > > didn't hit the bug_on, but got a bunch of > > > > [ 424.077993] swap_free: Unused swap offset entry 000187d5 > > [ 439.377194] swap_free: Unused swap offset entry 000187e7 > > [ 441.998411] swap_free: Unused swap offset entry 000187ee > > [ 446.956551] swap_free: Unused swap offset entry 0000245f > > > If page is reused, its swap entry is freed. > > reuse_swap_page() > delete_from_swap_cache() > swapcache_free() > count = swap_entry_free(p, entry, SWAP_HAS_CACHE); > > If count drops to zero, then swap_free() gives warning. > > > --- a/mm/memory.c Wed Aug 7 16:29:34 2013 > +++ b/mm/memory.c Thu Aug 22 10:44:32 2013 > @@ -3123,6 +3123,7 @@ static int do_swap_page(struct mm_struct > /* It's better to call commit-charge after rmap is established */ > mem_cgroup_commit_charge_swapin(page, ptr); > > + if (!exclusive) > swap_free(entry); > if (vm_swap_full() || (vma->vm_flags & VM_LOCKED) || PageMlocked(page)) > try_to_free_swap(page); > -- I still see the swap_free messages with this applied. Dave