Message ID | 20230119211455.498968-1-echanude@redhat.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp554490wrn; Thu, 19 Jan 2023 13:31:46 -0800 (PST) X-Google-Smtp-Source: AMrXdXsJBSwLbKqZmimihD9aqVkkVDhPLwgImXkSMyhavk2i2DK9C38B06/lgSyXvC2UI3n3Y8pH X-Received: by 2002:aa7:956c:0:b0:58d:9be3:f5e5 with SMTP id x12-20020aa7956c000000b0058d9be3f5e5mr13244348pfq.25.1674163906343; Thu, 19 Jan 2023 13:31:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674163906; cv=none; d=google.com; s=arc-20160816; b=d0bugvv9vDL61PbSpoiobtX/ovtZzQ5YMUBX+d3CIGbVPsj2b6wIShvv7c391yJKLZ SHbcUua6zclqoUsen9GC9fz9GeOQoZA8o5ihG8N7yXO8qcqTM2NVxJZskYQ6TkU0pJic 3YFwreON5vsT8CDh6CnoEPZyG7TftWstuwYZ4E6ubDmj5IlXDff/JDl4toZbQmyxN0n4 PuJ9GKdqYF5m/R6pmugdsjZbLG1tViiR8m3/8/bQOvvbbpAUiD3g1hxryXZwQwr+mE1r 90LkGVF/mfF3p1srGMO5gUNG9uFxzwoHBbSVolr9srOmoBf4THqVT0wcRCRgC0FlGl/m ox4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=y8twyfwh84c4dgge2UqdCfG48N/yPn3P76O0d8rOMcg=; b=AJf1dwNvuAfW8jbhzHW6ise9vjkeZMGW1LO8vovrYZrVybnOmpMzoGD16frs93OP4I r5IbqWj+9/z3DpVpKCWNrBDFHGeGzW0TUM0dKCtxkkQniZgSsq2J3fu/kDefKQzCAert 2mUxSrB7cazqeP6weynly5/VHmx0Zt1f7SuvB99iCcdM8OHOThkU2j1pGoFUt1TBSSDz 28WQNfyQE9n+FDL7TZENU+xIWd7b99Y7Ysktkz/aUemyPiXfGVqw7RL8hcdYsdVfvhvD Oernd8Bf2UhUNT9PDhwJvSxalw0T9Pc6GYiNYFJwky9JxqsXhVYC8jmNgIbr7k45GeJ1 88TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XZgV8o4A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o22-20020aa79796000000b005867dfce274si35241260pfp.127.2023.01.19.13.31.33; Thu, 19 Jan 2023 13:31:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XZgV8o4A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229986AbjASVYm (ORCPT <rfc822;pavtiger@gmail.com> + 99 others); Thu, 19 Jan 2023 16:24:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229974AbjASVWd (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 19 Jan 2023 16:22:33 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5B159AA81 for <linux-kernel@vger.kernel.org>; Thu, 19 Jan 2023 13:15:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674162925; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y8twyfwh84c4dgge2UqdCfG48N/yPn3P76O0d8rOMcg=; b=XZgV8o4AKg8ILwAsd4e1N8Hu8Dlarwz3guX8Dubl6v8zYp7G/IQdhKQRDNYpPOUhGbnHG2 53UCCfvi4DDAPpRxkR+kxh5NyfE6FZR5qpA8jYkk+Kc4ldTXO5xSa2twzeZ4rzLCVJzLZ1 B0O28pzwZdlhhJ5k4UBsgxzCtWfqycU= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-468-UGyeNJNmPgCROrME4CnH-w-1; Thu, 19 Jan 2023 16:15:24 -0500 X-MC-Unique: UGyeNJNmPgCROrME4CnH-w-1 Received: by mail-qk1-f197.google.com with SMTP id q21-20020a05620a0d9500b0070572ccdbf9so2120229qkl.10 for <linux-kernel@vger.kernel.org>; Thu, 19 Jan 2023 13:15:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=y8twyfwh84c4dgge2UqdCfG48N/yPn3P76O0d8rOMcg=; b=OmFMO/MjrDHlfnKf0bJGgVQBlFfwY7Bkli0rUmIkFJQ3G3Q2i5x/lJ9DcOEDOJo/Tr awPIglwuJXIqaXc4A9YG5lXzaPls+TxYPb+RJlJXtSWyuhvFfKspO9XS8qaqI3uHtZFd 1b0DwXhpS7N1RgsE5Q7GEEeBCcwFYCoEjFRArVLbFPxVfZrKqNKrejRIHJbflLslSL74 BSaoz9TBQK63LSHNOZezZ/j9PpzAiBUdMO3RMEZ6rRux2M8EDvrcAO8fCukm8mxUB4tf jKzZFFIRmSrMm9LnQPd4nJjEjNd/MRgopnArS711IfByPLdOpLcB0/L/c0nHmK/aNgks +QsA== X-Gm-Message-State: AFqh2kqp5py/2MA/BNenHnZexiVB7Lv5vuRGTnhXHSW9KJS5YjcGnYTp 51U/y9SxwDDRAqOz1zdzKIqf/xYI2ZrGdAD96IfylgNhoN1FqnnKnYYj1pVEeHdrPcexuq5teIF 3SaP6xkYW4uUoWwf0BaObmmeg X-Received: by 2002:ac8:6f09:0:b0:3a7:e271:fc05 with SMTP id bs9-20020ac86f09000000b003a7e271fc05mr20033784qtb.3.1674162924087; Thu, 19 Jan 2023 13:15:24 -0800 (PST) X-Received: by 2002:ac8:6f09:0:b0:3a7:e271:fc05 with SMTP id bs9-20020ac86f09000000b003a7e271fc05mr20033758qtb.3.1674162923829; Thu, 19 Jan 2023 13:15:23 -0800 (PST) Received: from localhost (pool-71-184-142-128.bstnma.fios.verizon.net. [71.184.142.128]) by smtp.gmail.com with ESMTPSA id t20-20020ac865d4000000b003ab7aee56a0sm3081504qto.39.2023.01.19.13.15.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Jan 2023 13:15:23 -0800 (PST) From: Eric Chanudet <echanude@redhat.com> To: Alexander Viro <viro@zeniv.linux.org.uk> Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org, Alexander Larsson <alexl@redhat.com>, Andrew Halaney <ahalaney@redhat.com>, Eric Chanudet <echanude@redhat.com> Subject: [RFC PATCH RESEND 0/1] fs/namespace: defer free_mount from namespace_unlock Date: Thu, 19 Jan 2023 16:14:54 -0500 Message-Id: <20230119211455.498968-1-echanude@redhat.com> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-type: text/plain Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755486370383353604?= X-GMAIL-MSGID: =?utf-8?q?1755488092267843082?= |
Series |
fs/namespace: defer free_mount from namespace_unlock
|
|
Message
Eric Chanudet
Jan. 19, 2023, 9:14 p.m. UTC
We noticed significant slow down when running containers on an Aarch64 system with the RT patch set using the following test: # mkdir -p "rootfs/bin" # printf "int main(){return 0;}" | gcc -x c - -static -o rootfs/bin/sh # crun spec # perf stat -r 10 --table --null -- crun run test Performance counter stats for 'crun run test' (10 runs): # Table of individual measurements: 0.3902 (-0.1941) ########## 0.5791 (-0.0053) # 0.5785 (-0.0058) # 0.5891 (+0.0047) # 0.6682 (+0.0839) ### 0.5507 (-0.0337) ## 0.5888 (+0.0044) # 0.5797 (-0.0047) # 0.5977 (+0.0133) # 0.7217 (+0.1374) #### # Final result: 0.5844 +- 0.0269 seconds time elapsed ( +- 4.60% ) A 6.2 non-RT kernel results on the same hardware for comparison: Performance counter stats for 'crun run test' (10 runs): # Table of individual measurements: 0.1680 (+0.1375) ################# 0.0074 (-0.0231) ############################################################### 0.0073 (-0.0232) ################################################################ 0.0070 (-0.0235) #################################################################### 0.0072 (-0.0233) ################################################################# 0.0794 (+0.0489) ############# 0.0078 (-0.0227) ########################################################## 0.0070 (-0.0235) ################################################################### 0.0070 (-0.0235) #################################################################### 0.0068 (-0.0237) ###################################################################### # Final result: 0.0305 +- 0.0169 seconds time elapsed ( +- 55.33% ) It looks like there is one bottleneck in: -> do_umount -> namespace_unlock -> synchronize_rcu_expedited With the following patch, namespace_unlock will queue up the resources that needs to be released and defer the operation through call_rcu to return without waiting for the grace period. Alexander Larsson (1): fs/namespace: defer free_mount from namespace_unlock fs/namespace.c | 42 +++++++++++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 7 deletions(-)