From patchwork Fri Dec 16 15:05:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Galbraith X-Patchwork-Id: 9478021 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8110760827 for ; Fri, 16 Dec 2016 15:15:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7252128734 for ; Fri, 16 Dec 2016 15:15:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 666A2287AF; Fri, 16 Dec 2016 15:15:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E201A28734 for ; Fri, 16 Dec 2016 15:15:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759591AbcLPPPS (ORCPT ); Fri, 16 Dec 2016 10:15:18 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:35553 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757475AbcLPPPO (ORCPT ); Fri, 16 Dec 2016 10:15:14 -0500 Received: by mail-wm0-f66.google.com with SMTP id a20so6048956wme.2; Fri, 16 Dec 2016 07:15:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=732UFRkH5iNwb1o1bW3FL++/3N9mI14C5Pz7MBvW+q8=; b=iRB8f1+zGOVP8e3A7K8K9K01ZYSZz6aoQ+h7BjKpuxJMSdXP3S5qc9+PQ60XMBJCH9 ho5GOred+v+Z+RCEDXk3nZCr6ny6ydppxv3RDxPJrT4xMPjwRCG6ijBLOaZOokdfVe4l NrvvKkPpr6Y7E1105s4Eja1vXHblZi3FjPCtv/T+VKKQL742JKdPSTuwlJ4aC1MtTL5H v1agsF3zTbnpKO0dTzqU6jMtGskp8+k0oo35ySD71n0kNJ+6u44vPjgVosheQCtpSW0h PmrDUMaT61GhMonfA4jcN3lQRGiO3Rz4sZq33ZMRLMVyLyWVWo9O7UgECZF6BZq5LDKc ZJqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=732UFRkH5iNwb1o1bW3FL++/3N9mI14C5Pz7MBvW+q8=; b=i45bFE/JtqzBykJPSs2/Ea7EwW/u2f2NBo99RAt4VOMhNLytGvsZPhJepjNTIWiWAb 4znux/54UAamr60MS+c0qpiuLhP2UC0IPS5h+gyK131oA1Jx+xOOq3o8RiNb8USiNKII ukyLlhNx+G4X350nmBMuVCCesr2MlfRDwH9gj6uSUiTltH0klKGn9Pu4zN69z7xvw8H1 0PyFUVxynU63YfcAigPyJjMVm6rd57qgc8/JBNDMMruES2x7+Qtre9W186kcbVP09lOh 8HuVROZYquLoad061sTbIWnFZmMzU/JRUHjs7e3Gr3nA8RUPKEY9bvUhUnBlD2dLUyH5 TumA== X-Gm-Message-State: AIkVDXLMXaB7j+xCUhf8gz8ZjAWz2v328y8HKCSzk8LJidygjkgQPtcoEtGEx8hF3w6Trw== X-Received: by 10.28.189.69 with SMTP id n66mr3472786wmf.35.1481900760528; Fri, 16 Dec 2016 07:06:00 -0800 (PST) Received: from homer.simpson.net ([185.146.50.138]) by smtp.googlemail.com with ESMTPSA id d8sm3695947wmi.21.2016.12.16.07.05.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Dec 2016 07:05:59 -0800 (PST) Message-ID: <1481900758.31172.20.camel@gmail.com> Subject: Re: [PATCH 0/9 v2] scope GFP_NOFS api From: Mike Galbraith To: Michal Hocko , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Cc: Andrew Morton , Dave Chinner , Theodore Ts'o , Chris Mason , David Sterba , Jan Kara , ceph-devel@vger.kernel.org, cluster-devel@redhat.com, linux-nfs@vger.kernel.org, logfs@logfs.org, linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-mtd@lists.infradead.org, reiserfs-devel@vger.kernel.org, linux-ntfs-dev@lists.sourceforge.net, linux-f2fs-devel@lists.sourceforge.net, linux-afs@lists.infradead.org, LKML , Michal Hocko , "Peter Zijlstra (Intel)" Date: Fri, 16 Dec 2016 16:05:58 +0100 In-Reply-To: <20161215140715.12732-1-mhocko@kernel.org> References: <20161215140715.12732-1-mhocko@kernel.org> X-Mailer: Evolution 3.16.5 Mime-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Thu, 2016-12-15 at 15:07 +0100, Michal Hocko wrote: > Hi, > I have posted the previous version here [1]. Since then I have added a > support to suppress reclaim lockdep warnings (__GFP_NOLOCKDEP) to allow > removing GFP_NOFS usage motivated by the lockdep false positives. On top > of that I've tried to convert few KM_NOFS usages to use the new flag in > the xfs code base. This would need a review from somebody familiar with > xfs of course. The wild ass guess below prevents the xfs explosion below when running ltp zram tests. --- fs/xfs/kmem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) [ 108.775501] ------------[ cut here ]------------ [ 108.775503] kernel BUG at fs/xfs/kmem.h:48! [ 108.775504] invalid opcode: 0000 [#1] SMP [ 108.775505] Dumping ftrace buffer: [ 108.775508] (ftrace buffer empty) [ 108.775508] Modules linked in: xfs(E) libcrc32c(E) btrfs(E) xor(E) raid6_pq(E) zram(E) ebtable_filter(E) ebtables(E) fuse(E) bridge(E) stp(E) llc(E) iscsi_ibft(E) iscsi_boot_sysfs(E) ip6t_REJECT(E) xt_tcpudp(E) nf_conntrack_ipv6(E) nf_defrag_ipv6(E) ip6table_raw(E) ipt_REJECT(E) iptable_raw(E) iptable_filter(E) ip6table_mangle(E) nf_conntrack_netbios_ns(E) nf_conntrack_broadcast(E) nf_conntrack_ipv4(E) nf_defrag_ipv4(E) ip_tables(E) xt_conntrack(E) nf_conntrack(E) ip6table_filter(E) ip6_tables(E) x_tables(E) nls_iso8859_1(E) nls_cp437(E) x86_pkg_temp_thermal(E) intel_powerclamp(E) coretemp(E) kvm_intel(E) nfsd(E) kvm(E) auth_rpcgss(E) nfs_acl(E) lockd(E) snd_hda_codec_realtek(E) snd_hda_codec_hdmi(E) pl2303(E) grace(E) snd_hda_codec_generic(E) usbserial(E) irqbypass(E) snd_hda_intel(E) snd_hda_codec(E) [ 108.775523] snd_hwdep(E) sunrpc(E) snd_hda_core(E) crct10dif_pclmul(E) mei_me(E) mei(E) serio_raw(E) snd_pcm(E) crc32_pclmul(E) snd_timer(E) crc32c_intel(E) aesni_intel(E) aes_x86_64(E) crypto_simd(E) iTCO_wdt(E) iTCO_vendor_support(E) lpc_ich(E) mfd_core(E) snd(E) soundcore(E) joydev(E) fan(E) shpchp(E) tpm_infineon(E) cryptd(E) battery(E) thermal(E) pcspkr(E) glue_helper(E) usblp(E) intel_smartconnect(E) i2c_i801(E) efivarfs(E) hid_logitech_hidpp(E) hid_logitech_dj(E) hid_generic(E) usbhid(E) nouveau(E) wmi(E) i2c_algo_bit(E) ahci(E) libahci(E) drm_kms_helper(E) syscopyarea(E) sysfillrect(E) sysimgblt(E) fb_sys_fops(E) ehci_pci(E) xhci_pci(E) ttm(E) ehci_hcd(E) xhci_hcd(E) r8169(E) libata(E) mii(E) drm(E) usbcore(E) fjes(E) video(E) button(E) af_packet(E) sd_mod(E) vfat(E) fat(E) ext4(E) crc16(E) [ 108.775540] jbd2(E) mbcache(E) dm_mod(E) loop(E) sg(E) scsi_mod(E) autofs4(E) [ 108.775544] CPU: 5 PID: 4495 Comm: mount Tainted: G E 4.10.0-master #4 [ 108.775545] Hardware name: MEDION MS-7848/MS-7848, BIOS M7848W08.20C 09/23/2013 [ 108.775546] task: ffff8803f9e54e00 task.stack: ffffc900018fc000 [ 108.775565] RIP: 0010:kmem_flags_convert.part.0+0x4/0x6 [xfs] [ 108.775565] RSP: 0018:ffffc900018ffcd8 EFLAGS: 00010202 [ 108.775566] RAX: ffff8803f630a800 RBX: ffff8803f6b20000 RCX: 0000000000001000 [ 108.775567] RDX: 0000000000001000 RSI: 0000000000000031 RDI: 00000000000000b0 [ 108.775568] RBP: ffffc900018ffcd8 R08: 0000000000019fe0 R09: ffff8803f6b20000 [ 108.775568] R10: 0000000000000005 R11: 0000000000010641 R12: ffff88041e21ea00 [ 108.775569] R13: ffff8803f6b20000 R14: 0000000000000000 R15: 00000000fffffff4 [ 108.775570] FS: 00007f1cbee9e840(0000) GS:ffff88041ed40000(0000) knlGS:0000000000000000 [ 108.775571] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 108.775571] CR2: 00007f5d4b6ed000 CR3: 00000003fbf13000 CR4: 00000000001406e0 [ 108.775572] Call Trace: [ 108.775588] kmem_alloc+0x100/0x100 [xfs] [ 108.775591] ? kstrndup+0x49/0x60 [ 108.775605] xfs_alloc_buftarg+0x23/0xd0 [xfs] [ 108.775619] xfs_open_devices+0x8c/0x170 [xfs] [ 108.775621] ? sb_set_blocksize+0x1d/0x50 [ 108.775633] xfs_fs_fill_super+0x234/0x580 [xfs] [ 108.775635] mount_bdev+0x184/0x1c0 [ 108.775647] ? xfs_test_remount_options.isra.15+0x60/0x60 [xfs] [ 108.775658] xfs_fs_mount+0x15/0x20 [xfs] [ 108.775659] mount_fs+0x15/0x90 [ 108.775661] vfs_kern_mount+0x67/0x130 [ 108.775663] do_mount+0x190/0xbd0 [ 108.775664] ? memdup_user+0x42/0x60 [ 108.775665] SyS_mount+0x83/0xd0 [ 108.775668] entry_SYSCALL_64_fastpath+0x1a/0xa9 [ 108.775669] RIP: 0033:0x7f1cbe7bf78a [ 108.775669] RSP: 002b:00007ffc99215198 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 [ 108.775670] RAX: ffffffffffffffda RBX: 00007f1cbeabb3b8 RCX: 00007f1cbe7bf78a [ 108.775671] RDX: 000055715a611690 RSI: 000055715a60d270 RDI: 000055715a60d2d0 [ 108.775671] RBP: 000055715a60d120 R08: 0000000000000000 R09: 00007f1cbea7c678 [ 108.775672] R10: 00000000c0ed0000 R11: 0000000000000202 R12: 00007f1cbecc8e78 [ 108.775672] R13: 00000000ffffffff R14: 0000000000000000 R15: 000055715a60d060 [ 108.775673] Code: ff 74 05 e8 c2 17 64 e0 48 8b 3d 6b ec 03 00 48 85 ff 74 05 e8 b1 17 64 e0 48 8b 3d 32 ec 03 00 e8 25 a6 74 e0 5d c3 55 48 89 e5 <0f> 0b 55 48 89 e5 e8 f4 53 ff ff 48 c7 c7 40 78 b7 a0 e8 18 01 [ 108.775700] RIP: kmem_flags_convert.part.0+0x4/0x6 [xfs] RSP: ffffc900018ffcd8 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/fs/xfs/kmem.h +++ b/fs/xfs/kmem.h @@ -45,7 +45,7 @@ kmem_flags_convert(xfs_km_flags_t flags) { gfp_t lflags; - BUG_ON(flags & ~(KM_SLEEP|KM_NOSLEEP|KM_NOFS|KM_MAYFAIL|KM_ZERO)); + BUG_ON(flags & ~(KM_SLEEP|KM_NOSLEEP|KM_NOFS|KM_MAYFAIL|KM_ZERO|KM_NOLOCKDEP)); if (flags & KM_NOSLEEP) { lflags = GFP_ATOMIC | __GFP_NOWARN;