Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750996AbbFKGC4 (ORCPT ); Thu, 11 Jun 2015 02:02:56 -0400 Received: from shards.monkeyblade.net ([149.20.54.216]:58277 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750717AbbFKGCr (ORCPT ); Thu, 11 Jun 2015 02:02:47 -0400 Date: Wed, 10 Jun 2015 23:02:45 -0700 (PDT) Message-Id: <20150610.230245.11186520327122078.davem@davemloft.net> To: jlayton@poochiereds.net Cc: trond.myklebust@primarydata.com, netdev@vger.kernel.org, linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, mgorman@suse.de, linux-mm@kvack.org, leon@leon.nu Subject: Re: [PATCH v2] net, swap: Remove a warning and clarify why sk_mem_reclaim is required when deactivating swap From: David Miller In-Reply-To: <1433984524-28063-1-git-send-email-jeff.layton@primarydata.com> References: <1433875204-18060-1-git-send-email-jeff.layton@primarydata.com> <1433984524-28063-1-git-send-email-jeff.layton@primarydata.com> X-Mailer: Mew version 6.6 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 10 Jun 2015 23:02:46 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2833 Lines: 46 From: Jeff Layton Date: Wed, 10 Jun 2015 21:02:04 -0400 > From: Mel Gorman > > Jeff Layton reported the following; > > [ 74.232485] ------------[ cut here ]------------ > [ 74.233354] WARNING: CPU: 2 PID: 754 at net/core/sock.c:364 sk_clear_memalloc+0x51/0x80() > [ 74.234790] Modules linked in: cts rpcsec_gss_krb5 nfsv4 dns_resolver nfs fscache xfs libcrc32c snd_hda_codec_generic snd_hda_intel snd_hda_controller snd_hda_codec snd_hda_core snd_hwdep snd_seq snd_seq_device nfsd snd_pcm snd_timer snd e1000 ppdev parport_pc joydev parport pvpanic soundcore floppy serio_raw i2c_piix4 pcspkr nfs_acl lockd virtio_balloon acpi_cpufreq auth_rpcgss grace sunrpc qxl drm_kms_helper ttm drm virtio_console virtio_blk virtio_pci ata_generic virtio_ring pata_acpi virtio > [ 74.243599] CPU: 2 PID: 754 Comm: swapoff Not tainted 4.1.0-rc6+ #5 > [ 74.244635] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 > [ 74.245546] 0000000000000000 0000000079e69e31 ffff8800d066bde8 ffffffff8179263d > [ 74.246786] 0000000000000000 0000000000000000 ffff8800d066be28 ffffffff8109e6fa > [ 74.248175] 0000000000000000 ffff880118d48000 ffff8800d58f5c08 ffff880036e380a8 > [ 74.249483] Call Trace: > [ 74.249872] [] dump_stack+0x45/0x57 > [ 74.250703] [] warn_slowpath_common+0x8a/0xc0 > [ 74.251655] [] warn_slowpath_null+0x1a/0x20 > [ 74.252585] [] sk_clear_memalloc+0x51/0x80 > [ 74.253519] [] xs_disable_swap+0x42/0x80 [sunrpc] > [ 74.254537] [] rpc_clnt_swap_deactivate+0x7e/0xc0 [sunrpc] > [ 74.255610] [] nfs_swap_deactivate+0x27/0x30 [nfs] > [ 74.256582] [] destroy_swap_extents+0x74/0x80 > [ 74.257496] [] SyS_swapoff+0x222/0x5c0 > [ 74.258318] [] ? syscall_trace_leave+0xc7/0x140 > [ 74.259253] [] system_call_fastpath+0x12/0x71 > [ 74.260158] ---[ end trace 2530722966429f10 ]--- > > The warning in question was unnecessary but with Jeff's series the rules > are also clearer. This patch removes the warning and updates the comment > to explain why sk_mem_reclaim() may still be called. > > [jlayton: remove if (sk->sk_forward_alloc) conditional. As Leon > points out that it's not needed.] > > Cc: Leon Romanovsky > Signed-off-by: Mel Gorman > Signed-off-by: Jeff Layton Applied, thanks everyone. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/