Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5995635pxb; Mon, 14 Feb 2022 12:41:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJzENshoRh4rLE4MGxws3MaqbrGCWRPLtBbEDPBZOX7VVrmxsV2Vc97Jqi3UsMxJpyDa8Jxw X-Received: by 2002:a17:90b:180e:b0:1b9:e022:280a with SMTP id lw14-20020a17090b180e00b001b9e022280amr576848pjb.20.1644871265496; Mon, 14 Feb 2022 12:41:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1644871265; cv=pass; d=google.com; s=arc-20160816; b=E8I4uZladm0BgSlHat+mXqk5Gl9+8KfX10cBKC5jNQXhxpy6QeEDI08tIz0Ty2X8xH t0h5bOXqY5EJjjBti6pNAUXkIEHVL8b9wgi9vfcbZo4WZ49i1YEAvYUdmp9bc/WN6iXw ivBbYEdAVqecjjf/VK8BqATvskam7C34Jd30nBB3M4eXuluTJLc28i9I1QJiFFcBdP+g xfRvXa4INH0Z8aS73KIJkYYS129NVLVap6LIZM0Hla8AULHNkA+LrgLTb732WJlkMR4S 1TjP8F9vLOcGZs443S/5n3bATfhDAjXBSGSzJtmfRBMwPh5QuMCALsg3MWzS7bDP2zxr qdZw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature:dkim-signature; bh=RbBYBfSeYIqbWLtOj6N1bQ7yO8cqqTtu13Aty/Txa6M=; b=eGuRiQKTSKpH+U9R20MfHDfi+nPiKhoieAYKngkcquHyjMup43bfwo4WK5d/8PybTr ciboLfRl06xoCeQl6/bJKA8PlxyIiPzv3ewnLMTk/Mz+Hlsc5APM5uHgdou+TJSG2y2U /sFGMy/OfafYVirLKalkxTfNrdSbUtgJUsu20xIFBk3n3UHbdtim/eXu1vKTTTEQBnEc UJKSKnvTWeNlEBmOXJ/7Z7+2FMl0FsezjTlVeKLoCWCKfRus9h4B8HtGHXg33AczYSSh iNkXwKH2d9A3CGlQDagAWGk1RRysXdKZ5S+kbyTJYOXylxRYfZPf4YV7ilqps7DjClPH PD1g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b="xmhrj/1W"; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=ZI8jYgoD; arc=pass (i=1); spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id q127si672723pgq.21.2022.02.14.12.41.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 12:41:05 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b="xmhrj/1W"; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=ZI8jYgoD; arc=pass (i=1); spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D4F6F1B6516; Mon, 14 Feb 2022 12:09:17 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238273AbiBNMN1 (ORCPT + 99 others); Mon, 14 Feb 2022 07:13:27 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:47896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236790AbiBNMNZ (ORCPT ); Mon, 14 Feb 2022 07:13:25 -0500 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B208F48E7B for ; Mon, 14 Feb 2022 04:13:17 -0800 (PST) Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 21EATJCZ021228; Mon, 14 Feb 2022 12:13:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=RbBYBfSeYIqbWLtOj6N1bQ7yO8cqqTtu13Aty/Txa6M=; b=xmhrj/1WRVFxQPwpkx2vPCxwV0TKGM855MGTogd3mPdX6uwxJW2ngLg5zVzEQqQ1fLvg CsbPXq+l2m4LFtqYDFhK4rz1cY2nK2KdmfCIYz0B9M9CkCdOebKqcl8aM2Sp4Ow2vf2M ZhEYcpXL4xkIY46ue+3VCprjh5qr7gdZ6vVuv8SEB7NSUUC2w/e+U9Hz1IHZBGVc6S78 bgRQLtSZLELByT7zl0z+2xNcCuiUSGyn/Qrn7j85tPax4uHfVgacWlZQlj8QHdvynLoH mqNC8r0YIJaA1tt/+5comGZl+hl5Wnf2r8fWMIJkT0TMeNRx0Ko4Qo+i5mI8SYdSGoFi bQ== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by mx0b-00069f02.pphosted.com with ESMTP id 3e63p24c55-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 14 Feb 2022 12:13:12 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 21EC6NtQ033530; Mon, 14 Feb 2022 12:13:11 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2174.outbound.protection.outlook.com [104.47.59.174]) by aserp3030.oracle.com with ESMTP id 3e62xd0m3a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 14 Feb 2022 12:13:10 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l9w/iBnKAjChH/1JCfJjjO+O+PkGpaEJS2/AUb8NNPc/y2lPHBfjLuZyZA7rBcykMrYh1Kq4SqDy/lDyI3RSndTy+fBeFMIWEtUtWgBHudEFyiYr5JXNMgqwVMutCYgHXEjA5Alx0dXmFtkupV1qddfQ9Gsjtpmrz7eQgeSlx3V8YvR8nj1CiKoZdDvhFCM8FriIVn89NjVoA8YsZAoq3lCsZOhrEaqaVULyCuMuaMofnqBoeH1UNNxxSt9DBXNUh1eRXAEwyhAS8LEp6jTScXqeUXIi46HO6iELCTtvnU6K7fJTiN7RuAoQO61yl6S8QtjJp0aiuOHqUT8ai9sT2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RbBYBfSeYIqbWLtOj6N1bQ7yO8cqqTtu13Aty/Txa6M=; b=G0Ggj/AmZdLfRAkRkNypZGRIA3i8I9hZXnOHwCWA1vJive1t+pnlo/3K9pDG74WkLgOlvlEum2BhNmlL7BGt/ZobysTMi7HoWRXpHRzDT5LP/m8LZ8+pOZtwzQ36PZt3YWyMcYkChc4w8H4T0Iwd/BEXRI9R6YIKFi2Ba/RxeNcM5zlZ5tNHnZAkJmmiJh7+YLDvXiRqc6jYFkPwquaQ5HXhIXJgFJNqumdF4MjL/dvrO/mht5ABDLRxv2WZ3GgzuvvP92z3bsIknPGlv29qMVML6ClcFoT1GwjrFEh5Idlwa2rjKepFAAkG029Tp6/w/8FnrNcnZIl43pUuJ/2q7A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RbBYBfSeYIqbWLtOj6N1bQ7yO8cqqTtu13Aty/Txa6M=; b=ZI8jYgoDdml+7GZuXGmoaeSxOMVBB/ItO3PFqN5fhZK80iXNsCMvSmBL582K2uWqnHOplvdoLKfd96+X0+mJT4v03l/HpZqybCvzdHvOyBQ9cuZlRbkoCj4vMQ8lxTqjgLxkQMqboLYStj/pSa4mpP/R50OXmJBcJAxvM3h2kWI= Received: from CO1PR10MB4468.namprd10.prod.outlook.com (2603:10b6:303:6c::24) by BN0PR10MB4837.namprd10.prod.outlook.com (2603:10b6:408:116::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.14; Mon, 14 Feb 2022 12:13:09 +0000 Received: from CO1PR10MB4468.namprd10.prod.outlook.com ([fe80::a5d1:ed4:5ab6:e9b1]) by CO1PR10MB4468.namprd10.prod.outlook.com ([fe80::a5d1:ed4:5ab6:e9b1%4]) with mapi id 15.20.4975.019; Mon, 14 Feb 2022 12:13:08 +0000 Message-ID: Date: Mon, 14 Feb 2022 23:13:02 +1100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 Subject: Re: [PATCH v5 1/2] kernfs: use hashed mutex and spinlock in place of global ones. Content-Language: en-US To: Greg KH Cc: tj@kernel.org, linux-kernel@vger.kernel.org References: <20220206010925.1033990-1-imran.f.khan@oracle.com> <20220206010925.1033990-2-imran.f.khan@oracle.com> From: Imran Khan In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SY2PR01CA0016.ausprd01.prod.outlook.com (2603:10c6:1:14::28) To CO1PR10MB4468.namprd10.prod.outlook.com (2603:10b6:303:6c::24) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5ed516ee-f46a-4b90-eae0-08d9efb35cd8 X-MS-TrafficTypeDiagnostic: BN0PR10MB4837:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Y2G5ELJXIvt2uPosI6UYpHsTTAZDxoWf3sUVvGaNHb16WfZ1IkFE1FLjmmV7hBX3yGTm6yku000Bk8ZqIK2iTIxcWboQWughXSsh0ES01qhNuf6I6LVxHWKuwbIP1R3k/3JUkUVPp+xTh+3VC+2+0ix9XG1lknAvQ3Y4w042puQgu74D8iFRav2VzL61I75WZPBg3oEhBeKm5xFQWZQwLdUqacYKXRR33IGt8lOuLvti2NDBhDERKODxzptozmSr+IGlfEgjPcaBmYlnnm8iz982Eb/sJGMFqUQCQM7WItjJZ32F5Fc5M/3RbbCqpBjBms2fCf6k00CpsH0pW197ARL2kiTaFiJVRVKNHbaJlTovg5seoMdeDhojAuT1nqwoNx3pKfzck4vdcdwmwPSVnHOv09XbqtD4C3gt093yu5++KmKbav4kSDOnQsLEP2RjCn9VT7WyTnywn5vNeb1FGwYQhLJ7stZFn4Yu4w77NRffwhnIgg8VQCIXxLRZfFv7U2u+j6gWehBFi2bNgA0q7Ghm9Wu+BCQSIoQx6E8KRMLv0XLcJW4QObsfHK3aC+YVmoedIi/fHH7ZdmzmbQrDWQCLjgZOlSbnhey2jRFznAkanPthClUFeCYHcLDOiSaFW4frdMYU81q8dD5vrJVNIxeMc7QQzuJolsEnG1FVAxNsWwBmp7tMJtV9muMLB5ErbnDuHzEl1zXbWVs3+LHsahm/sR6hkjg799JAR/6yoyKNsBmdON8LsQFV4V6eJZxi7pUj+ikdhu7djSy6X+C+8EKiFhAF89fOrmtcQpBotpj8CMsreqC6jvwSdngh7dXq X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO1PR10MB4468.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(31686004)(2616005)(83380400001)(53546011)(186003)(26005)(38100700002)(66946007)(66556008)(66476007)(966005)(6506007)(508600001)(6512007)(6666004)(316002)(6916009)(5660300002)(86362001)(31696002)(8936002)(36756003)(2906002)(8676002)(4326008)(6486002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?aDBaR281N011eDJGNytzbkVWZ0UzUit0eG5WK2hYSDJ6L2N3UDRMSmJjd1Rt?= =?utf-8?B?eTRJRU9YdTlFOVdlaHJaR09zSnVGNEF1TytxYUEvSjRDTGp6TjFNNEtjODZ2?= =?utf-8?B?WWpTMkZuZkxOM3V4UEUzV1MxdTA3cVphVXB0WVZEOXlXOXRVUmxpZHk1MElL?= =?utf-8?B?YmJwTGFvd3kyRWwwZUFyNUxLeFphcmZIei9ycnA4OVFpQnptQUIzMEROZ28w?= =?utf-8?B?eC9oREFjZ09UcVZMWWtCM1BucjNVNndHczMwZ0x4K0lKRFpRZE1WdUN2MU84?= =?utf-8?B?OHh2VXRBRm9tcEo2YTAwYmlVTlNBdFFZa0hTL1BMZEpNWXE1Q0plZk1memN4?= =?utf-8?B?bmh1KzFhT0hDQkhDNUpvcGdYOFA1LytwK29Td2FxL0hTdlNaa2dWTE9ocUhs?= =?utf-8?B?aDI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orOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5ed516ee-f46a-4b90-eae0-08d9efb35cd8 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4468.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Feb 2022 12:13:08.8352 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: a0FAeZhyLBTfonv25CgRX8Yk+6ZDWtqOST5XONSNj9/vckprRkf76FTTJWKa4V1PGAdD890PvrDEBEkp0nVBdQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR10MB4837 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10257 signatures=673431 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 phishscore=0 bulkscore=0 malwarescore=0 adultscore=0 spamscore=0 mlxlogscore=999 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2202140074 X-Proofpoint-ORIG-GUID: nTF9N8K0oUWSebbb06WHQaX96KjK_SKn X-Proofpoint-GUID: nTF9N8K0oUWSebbb06WHQaX96KjK_SKn X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Greg, Thanks for reviewing this. On 8/2/22 10:27 pm, Greg KH wrote: > On Sun, Feb 06, 2022 at 12:09:24PM +1100, Imran Khan wrote: >> diff --git a/fs/kernfs/kernfs-internal.h b/fs/kernfs/kernfs-internal.h >> index f9cc912c31e1b..cc49a6cd94154 100644 >> --- a/fs/kernfs/kernfs-internal.h >> +++ b/fs/kernfs/kernfs-internal.h >> @@ -31,6 +31,7 @@ struct kernfs_iattrs { >> atomic_t user_xattr_size; >> }; >> >> + >> /* +1 to avoid triggering overflow warning when negating it */ >> #define KN_DEACTIVATED_BIAS (INT_MIN + 1) >> > > Nit, the above change isn't needed :) This has been removed in version 6 of patch at [1]. > >> @@ -147,4 +148,54 @@ void kernfs_drain_open_files(struct kernfs_node *kn); >> */ >> extern const struct inode_operations kernfs_symlink_iops; >> [...] >> +} > > Can't you use kernfs_open_node_lock_ptr() in kernfs_open_node_lock() to > make this use less duplicated code? > Yes. I have removed duplicate code in version 6 of patch at [1]. > >> + [...] >> + return lock; >> +} > > Same thing here. > > Done. > >> + >> #endif /* __KERNFS_INTERNAL_H */ >> diff --git a/include/linux/kernfs.h b/include/linux/kernfs.h >> index 861c4f0f8a29f..5bf9f02ce9dce 100644 >> --- a/include/linux/kernfs.h >> +++ b/include/linux/kernfs.h >> @@ -18,6 +18,8 @@ >> #include >> #include >> #include >> +#include >> +#include >> >> struct file; >> struct dentry; >> @@ -34,6 +36,40 @@ struct kernfs_fs_context; >> struct kernfs_open_node; >> struct kernfs_iattrs; >> >> +/* [...] >> @@ -90,6 +126,7 @@ enum kernfs_root_flag { >> KERNFS_ROOT_SUPPORT_USER_XATTR = 0x0008, >> }; >> >> + >> /* type-specific structures for kernfs_node union members */ >> struct kernfs_elem_dir { >> unsigned long subdirs; >> @@ -201,6 +238,8 @@ struct kernfs_root { >> >> wait_queue_head_t deactivate_waitq; >> struct rw_semaphore kernfs_rwsem; >> + struct kernfs_open_node_lock open_node_locks[NR_KERNFS_LOCKS]; >> + struct kernfs_open_file_mutex open_file_mutex[NR_KERNFS_LOCKS]; >> }; > > I think struct kernfs_root can be declared locally inside fs/kernfs/ to > keep other subsystems/files from having to see this structure, right? > That would make this a bit less of a "rebuild the world" type of change > and could be done in a patch before this one. Tejun has suggested to avoid using per-fs hash table and take hash table outside kernfs_root. So this patch is not changing kernfs_root and I have left it in it's current place. Please let me know if moving kernfs_root is still needed. Thanks, -- Imran [1]: https://lore.kernel.org/lkml/20220214120322.2402628-1-imran.f.khan@oracle.com/ > > Overall, this looks sane to me, nice work. > > Tejun, any comments? > > thanks, > > greg k-h