Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp978538pxb; Thu, 9 Sep 2021 16:59:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxr7Z9/JCtJnq1p1bXJDGgFiyP81n3315a7f20tb8yvnLz5p89QCJjV+9q3FqgHIA0tE2Np X-Received: by 2002:a92:6410:: with SMTP id y16mr2131092ilb.192.1631231967775; Thu, 09 Sep 2021 16:59:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631231967; cv=none; d=google.com; s=arc-20160816; b=dMKcvW164WfyVXPEWA/so1rVzZv/WCEhBG38B4azDRm6pbfSZExb4ZSWWkdGGwSOak YnhsPC/R6AfwEnGPh2tcPBkLpCJI2t4NJQYIe/e4+5GmNh2gTx3MgO5G3JC+ppyOWKeA 8Z35ViKTsKCs17j0vWxdwcQ6wy0g69GgqRUOcSY6SgLaphywI+h/0QOzanMzcd3rWFHQ 9NlHl8VarCqE4FswGg3cZD/QpRuMhPIrnzdGQoj/3IDmE6LJRUu/xcjD5zbK3dKxBDgG gt8q8CqnWgBwcI8sq+YUMsBI/ZTuqJzKBh2RYfs7Ntffz1aMmq21gUPsTJtEFoA+WXtt HLzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject:dkim-signature; bh=vnx9eaK6Rf7jbpckAL093aW2bY1xrkRJ0JeFL3qz8fg=; b=rc5xlS1aHKfKUqiedcac6m6HQ3jGymbqVdBcWiq0pTf8VqbCuU7UQUzYZiVr4U6ZbL ZTk70T4zJz54GaMCRfZbIC5tSsy5e0msVdQt6RzUwzmgzsjwlOI7koMIdP0ToopGl9+P dCujxobXsrEUGLvJLxGBO4twveOdGiHekU5H50WFtkwIHqh8cC7jWvxll8micMbLbjG3 Y437MXc5H2nZBBTnu2uwHJXsHVwylFNo4boCnN5R17anoYcGihTJPqHnkFBER1HsYSKF /VIM9JDK51EuACSdAs7Ue93nopvsFDUCuF24Yb3BC+jnmOFWieVb/LrMw3U1sVFoex2S +ZJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=urGtZ56E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h11si3480974ild.67.2021.09.09.16.59.16; Thu, 09 Sep 2021 16:59:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=urGtZ56E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229556AbhIIXwk (ORCPT + 99 others); Thu, 9 Sep 2021 19:52:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:33270 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbhIIXwk (ORCPT ); Thu, 9 Sep 2021 19:52:40 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5FB36610E9; Thu, 9 Sep 2021 23:51:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631231490; bh=fztYKXwCNriqil1UbKCuyBqnFoKNcnIMC9/mJUjAils=; h=Subject:To:References:From:Date:In-Reply-To:From; b=urGtZ56EpHaXAcPm9F103+W/UhQ6A5tOHIELnS27hJPbf0riXPNIIaQ/6F3sxJOLO bleOHITbxmgh64Aok8t3qKQ2IvxGOz4caCBewz8dMSN/OSkaQ/hnlU/37Bew3u4/zK l5BuFR+6K9rYH1aMV+28+uxaTtd0gcpLPEmTgBlH81ht7SNMjn+/2T7vpiKzcRvLUD eAvifvkG18e2XX6OlzN5s0Xi8T13NAbh2Uj6k2Rhl0n/wyTW823AyiihfH53kfpB4Z msrSzms5LlrOrJ2+WvX9PnhlkVWSnpAEY33GO/N5HMT/JDaMtx38UXGDgxVT0ixU5p E5UMLNWsHyqMg== Subject: Re: [f2fs-dev] [PATCH] f2fs: should use GFP_NOFS for directory inodes To: Jaegeuk Kim , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net References: <20210907174351.1104857-1-jaegeuk@kernel.org> From: Chao Yu Message-ID: <6c40b766-2bdc-03c2-9e8a-e399d6e83282@kernel.org> Date: Fri, 10 Sep 2021 07:51:29 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210907174351.1104857-1-jaegeuk@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/9/8 1:43, Jaegeuk Kim wrote: > We use inline_dentry which requires to allocate dentry page when adding a link. > If we allow to reclaim memory from filesystem, we do down_read(&sbi->cp_rwsem) > twice by f2fs_lock_op(). I think this should be okay, but how about stopping > the lockdep complaint [1]? > > f2fs_create() > - f2fs_lock_op() > - f2fs_do_add_link() > - __f2fs_find_entry > - f2fs_get_read_data_page() > -> kswapd > - shrink_node > - f2fs_evict_inode > - f2fs_lock_op() > > [1] > > fs_reclaim > ){+.+.}-{0:0} > : > kswapd0: lock_acquire+0x114/0x394 > kswapd0: __fs_reclaim_acquire+0x40/0x50 > kswapd0: prepare_alloc_pages+0x94/0x1ec > kswapd0: __alloc_pages_nodemask+0x78/0x1b0 > kswapd0: pagecache_get_page+0x2e0/0x57c > kswapd0: f2fs_get_read_data_page+0xc0/0x394 > kswapd0: f2fs_find_data_page+0xa4/0x23c > kswapd0: find_in_level+0x1a8/0x36c > kswapd0: __f2fs_find_entry+0x70/0x100 > kswapd0: f2fs_do_add_link+0x84/0x1ec > kswapd0: f2fs_mkdir+0xe4/0x1e4 > kswapd0: vfs_mkdir+0x110/0x1c0 > kswapd0: do_mkdirat+0xa4/0x160 > kswapd0: __arm64_sys_mkdirat+0x24/0x34 > kswapd0: el0_svc_common.llvm.17258447499513131576+0xc4/0x1e8 > kswapd0: do_el0_svc+0x28/0xa0 > kswapd0: el0_svc+0x24/0x38 > kswapd0: el0_sync_handler+0x88/0xec > kswapd0: el0_sync+0x1c0/0x200 > kswapd0: > -> #1 > ( > &sbi->cp_rwsem > ){++++}-{3:3} > : > kswapd0: lock_acquire+0x114/0x394 > kswapd0: down_read+0x7c/0x98 > kswapd0: f2fs_do_truncate_blocks+0x78/0x3dc > kswapd0: f2fs_truncate+0xc8/0x128 > kswapd0: f2fs_evict_inode+0x2b8/0x8b8 > kswapd0: evict+0xd4/0x2f8 > kswapd0: iput+0x1c0/0x258 > kswapd0: do_unlinkat+0x170/0x2a0 > kswapd0: __arm64_sys_unlinkat+0x4c/0x68 > kswapd0: el0_svc_common.llvm.17258447499513131576+0xc4/0x1e8 > kswapd0: do_el0_svc+0x28/0xa0 > kswapd0: el0_svc+0x24/0x38 > kswapd0: el0_sync_handler+0x88/0xec > kswapd0: el0_sync+0x1c0/0x200 > > Fixes: bdbc90fa55af ("f2fs: don't put dentry page in pagecache into highmem") > Signed-off-by: Jaegeuk Kim Reviewed-by: Chao Yu Thanks,