linux-nfs / nfsd

Linux kernel source tree
Other
0 stars 0 forks source link

Return a short COPY result to ensure synchronous COPY doesn't take too long #83

Closed chucklever closed 6 months ago

chucklever commented 6 months ago

Rick tells me that, to keep the execution time of synchronous COPY requests under 1-2 seconds, the FreeBSD server interrupts long-running COPY operations and returns the number of bytes copied so far. The client should be smart enough (?) to deal with the short result and then send another COPY request starting from where the previous one left off. This technique guarantees forward progress while not tying up server threads.

It's not clear yet if clients deal with this scenario properly.

chucklever commented 6 months ago

NFSD's COPY already does this; see nfsd_copy_file_range().

ROBERT-MCDOWELL commented 5 months ago

Hi Chuck, I don't know if my issue is related to this closed issue, but since kernel 6.9 I get often this kernel panic [14649.499482] ------------[ cut here ]------------ [14649.499496] WARNING: CPU: 4 PID: 59969 at fs/nfsd/nfs4callback.c:1336 nfsd4_cb_done+0x29a/0x2d0 [14649.499505] Modules linked in: rdma_ucm ib_iser rdma_rxe ib_uverbs ip6_udp_tunnel udp_tunnel nft_chain_nat xt_MASQUERADE nf_nat nf_conntrack_netlink xt_addrtype tls dm_thin_pool dm_persistent_data dm_bio_prison ts_bm nft_limit xt_string xt_connlimit nf_conncount xt_limit xt_conntrack nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xt_hashlimit nft_compat nf_tables sch_prio act_police cls_u32 sch_ingress iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi ip_set_hash_ip lz4 lz4_compress jc42 kvm_intel kvm lpc_ich igb sch_fq_codel dm_multipath raid0 polyval_clmulni polyval_generic sha512_ssse3 sha256_ssse3 sha1_ssse3 uas ast usb_storage br_netfilter bridge stp llc mgag200 drm_shmem_helper i915 i2c_algo_bit drm_buddy ttm drm_display_helper [14649.499579] CPU: 4 PID: 59969 Comm: kworker/u32:0 Tainted: G T 6.9.5 #1 [14649.499582] Hardware name: Supermicro X10SLH-F/X10SLM+-F/X10SLH-F/X10SLM+-F, BIOS 3.3 03/27/2020 [14649.499584] Workqueue: rpciod rpc_async_schedule [14649.499589] RIP: 0010:nfsd4_cb_done+0x29a/0x2d0 [14649.499603] Code: 00 00 e8 09 f3 c0 00 85 c0 0f 84 04 ff ff ff 5b 48 89 ef be d0 07 00 00 5d 41 5c 41 5d e9 fe d7 c1 00 4c 89 e7 e9 bc fe ff ff <0f> 0b e9 f4 fe ff ff 4c 89 e7 41 89 c5 e9 aa fe ff ff 80 7e 59 00 [14649.499606] RSP: 0018:ffffa29af15efdd0 EFLAGS: 00010286 [14649.499608] RAX: 00000000ffffd8ac RBX: ffff8f47a426f5b8 RCX: 0000000000000001 [14649.499611] RDX: 00000000ffffd8cc RSI: 0000000000000006 RDI: ffff8f47e297cdb0 [14649.499612] RBP: ffff8f45cc362000 R08: 0000000000000002 R09: 0000000000000004 [14649.499614] R10: 0000000000000007 R11: 0000000000000007 R12: ffff8f47e297c980 [14649.499616] R13: 0000000000000001 R14: 0000000004248060 R15: 0000000000000000 [14649.499618] FS: 0000000000000000(0000) GS:ffff8f4bffc00000(0000) knlGS:0000000000000000 [14649.499620] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [14649.499622] CR2: 00007f7c40610000 CR3: 00000002f1042002 CR4: 00000000001706f0 [14649.499624] Call Trace: [14649.499626] [14649.499629] ? warn+0x7f/0xb1 [14649.499632] ? nfsd4_cb_done+0x29a/0x2d0 [14649.499635] ? report_bug+0xf6/0x140 [14649.499637] ? handle_bug+0x3c/0x80 [14649.499640] ? exc_invalid_op+0x13/0x60 [14649.499642] ? asm_exc_invalid_op+0x16/0x20 [14649.499646] ? nfsd4_cb_done+0x29a/0x2d0 [14649.499648] rpc_exit_task+0x47/0xb0 [14649.499650] __rpc_execute+0x228/0x310 [14649.499652] ? static_key_disable_cpuslocked+0x55/0x90 [14649.499656] rpc_async_schedule+0x26/0x30 [14649.499658] process_one_work+0x17d/0x290 [14649.499660] worker_thread+0x268/0x3a0 [14649.499662] ? pfx_worker_thread+0x10/0x10 [14649.499664] kthread+0xc9/0x100 [14649.499667] ? __pfx_kthread+0x10/0x10 [14649.499669] ret_from_fork+0x2b/0x40 [14649.499672] ? __pfx_kthread+0x10/0x10 [14649.499675] ret_from_fork_asm+0x1a/0x30 [14649.499678] [14649.499679] ---[ end trace 0000000000000000 ]---

any idea? thanks

chucklever commented 5 months ago

Your crash is not related to this closed issue, and this issue tracker is not for bug reports. Open a fresh bug report on bugzilla.kernel.org to report your crash, or simply email it to linux-nfs@vger.kernel.org.

ROBERT-MCDOWELL commented 5 months ago

ok thanks