From patchwork Fri Mar 17 02:18:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chengen Du X-Patchwork-Id: 1758044 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=cjiPgJeD; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pd79Y5b0sz2473 for ; Fri, 17 Mar 2023 13:19:12 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1pczgH-0004af-P4; Fri, 17 Mar 2023 02:18:57 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1pczgF-0004aR-Rp for kernel-team@lists.ubuntu.com; Fri, 17 Mar 2023 02:18:55 +0000 Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id A8BF9445A2 for ; Fri, 17 Mar 2023 02:18:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1679019534; bh=SyaHSlnQo1DkkvVAtspeuw/iErtMw1yewOnnO+eyXtU=; h=From:To:Subject:Date:Message-Id:MIME-Version:Content-Type; b=cjiPgJeDbhCPfINM7+OOckqZzcs+lPCrqPZHBqmJjxjppnDu11lnf5CuHTPXeVkHB R8+J6os3bJm7nKg6gS7xZcDLc0cPy7hDS6DPnbTS3EVHRov20NalP8gFepDFRXPxvY CSvNwiEqem6SQO3HVN/lj0n3bppn8j5VmjIdpH+/lNNG/qG8DUgSysweIfN9hkvHed oAjuLYwC+eCtLyX1ElJ30a/l2bQeAFfKNgyg64VXcsynUq6cZdxNe3ynX3lDXWq6xf UsbNQEZxNdniJ3TjqN0T2bmV+pZYdFx3eT/yHvXenrBPTzwLt9DARAi+TRjMstD/gy L5Nf8lis9dMIA== Received: by mail-pj1-f70.google.com with SMTP id q8-20020a17090ad38800b0023f116f305bso2467590pju.0 for ; Thu, 16 Mar 2023 19:18:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679019532; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=SyaHSlnQo1DkkvVAtspeuw/iErtMw1yewOnnO+eyXtU=; b=552/1fdf5ilSkQ2FyhO6wGZ4U6/g7ZCJ033wUNaHEu17n6O7UMVcYZ0UpwY5NutwyQ MahY1M+Xtr+gRppgSW+XMMFoVrzlWx37XbI2nV8ietawif89sqfg1fXdq7wwJIdb9XQr +7OzdNggMnQexpqAM2dewvNEDFVuG0Wkp4PepylnGWsN8qGZa6Lw7pbhpsmL+G7C1AJE 3579HTQIKwKEAmMCwILEjSEzL6vhTiRG6bf59CDHdgjJ9PLve8czuWozJZTtv1qIj/Df lP+E+RGW5fXbaFvObFZdgGKxKzPFhjy1LmOCqbPni2T0O7EamsWSy5GRzet7BCd22F52 2FlA== X-Gm-Message-State: AO0yUKV9GItptIQL70jSyaOzbsvL2SjLvxl0htjlYawKVLsLIkhnpHIr Ww5Z1FCuGC9rMPy42oy7iuCGQIMliX78KQB3STMmtRXnvqNZtUUW3cVDlWF5u+z5F0DLKNlWIpy 5pm6zZVAe7jDxeEKUYudAPt6Gcla4tOcvgOuhnCPk5l9SxGfe1A== X-Received: by 2002:a17:903:1108:b0:1a1:465b:2d22 with SMTP id n8-20020a170903110800b001a1465b2d22mr6925861plh.47.1679019532390; Thu, 16 Mar 2023 19:18:52 -0700 (PDT) X-Google-Smtp-Source: AK7set/h/6q0uQ6Y2aSu/CwWIWhU8z39VbAAxCtZiwBqSeFwrqGBT+B0dxGwqZYQKf7aQUSu3nwGjQ== X-Received: by 2002:a17:903:1108:b0:1a1:465b:2d22 with SMTP id n8-20020a170903110800b001a1465b2d22mr6925847plh.47.1679019532043; Thu, 16 Mar 2023 19:18:52 -0700 (PDT) Received: from chengendu.. (111-248-125-11.dynamic-ip.hinet.net. [111.248.125.11]) by smtp.gmail.com with ESMTPSA id g9-20020a170902934900b0019f1205bdcbsm351338plp.147.2023.03.16.19.18.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Mar 2023 19:18:51 -0700 (PDT) From: Chengen Du To: kernel-team@lists.ubuntu.com Subject: [SRU][Bionic][PATCH 0/1] Fix the significant increase in NFS ACCESS operations Date: Fri, 17 Mar 2023 10:18:48 +0800 Message-Id: <20230317021849.22643-1-chengen.du@canonical.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/2009325 SRU Justification: [Impact] When a user logs in and their login time is more recent than the cache's timestamp, a new entry is created to replace the original entry in the RB-tree. Currently, the timestamp is only set if the entry is not found in the RB-tree. This can lead to the timestamp being undefined when the entry already exists, potentially causing a significant increase in ACCESS operations if the timestamp is set to zero. [Fix] The fix corrects the timing for assigning the access cache timestamp. git://git.linux-nfs.org/projects/anna/linux-nfs linux-nfs branch 21fd9e8700de86d1169f6336e97d7a74916ed04a (NFS: Correct timing for assigning access cache timestamp) [Test Plan] 1. Create some files in an NFS folder from the client side. 2. Log out and log back in with the same user. 3. Access the existing files in the NFS folder and confirm that the client side only sends one ACCESS operation to the server side. [Where problems could occur] This patch only adjusts the timing for initializing the cache's timestamp, which was found to be incorrect in the original code. While it does have an impact on NFS-related operations, it does not affect any other aspects of the system's logic apart from timestamp initialization. Chengen Du (1): NFS: Correct timing for assigning access cache timestamp fs/nfs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)