From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1679BC432C2 for ; Wed, 25 Sep 2019 12:22:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D4D8020673 for ; Wed, 25 Sep 2019 12:22:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730475AbfIYMWO (ORCPT ); Wed, 25 Sep 2019 08:22:14 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:37406 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730435AbfIYMWN (ORCPT ); Wed, 25 Sep 2019 08:22:13 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.2 #3 (Red Hat Linux)) id 1iD6J4-0007Bz-OF; Wed, 25 Sep 2019 12:22:06 +0000 Date: Wed, 25 Sep 2019 13:22:06 +0100 From: Al Viro To: Amir Goldstein Cc: Linus Torvalds , "zhengbin (A)" , Jan Kara , Andrew Morton , linux-fsdevel , "zhangyi (F)" , renxudong1@huawei.com, Hou Tao Subject: Re: [PATCH] Re: Possible FS race condition between iterate_dir and d_alloc_parallel Message-ID: <20190925122206.GJ26530@ZenIV.linux.org.uk> References: <20190914170146.GT1131@ZenIV.linux.org.uk> <20190914200412.GU1131@ZenIV.linux.org.uk> <20190915005046.GV1131@ZenIV.linux.org.uk> <20190915160236.GW1131@ZenIV.linux.org.uk> <20190921140731.GQ1131@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Wed, Sep 25, 2019 at 02:59:47PM +0300, Amir Goldstein wrote: > On Mon, Sep 23, 2019 at 5:34 PM Al Viro wrote: > > > > FWIW, #next.dcache has the straight conversion to hlist. > > Note that this: > @@ -108,8 +108,8 @@ struct dentry { > struct list_head d_lru; /* LRU list */ > wait_queue_head_t *d_wait; /* in-lookup ones only */ > }; > - struct list_head d_child; /* child of parent list */ > - struct list_head d_subdirs; /* our children */ > + struct hlist_node d_sibling; /* child of parent list */ > + struct hlist_head d_children; /* our children */ > > Changes the 'standard' struct dentry size from 192 to 184. > > Does that matter for cache line alignment? > > Should struct dentry be ____cacheline_aligned? *shrug* DNAME_INLINE_LEN would need to be adjusted; it's just that I think it would make a lot of sense to represent cursors not by dentries and hang those on an additional hlist_head in dentry...