From nobody Thu Mar 07 15:59:57 2024 X-Original-To: fs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TrDXJ2cf9z5DGkn for ; Thu, 7 Mar 2024 16:00:00 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TrDXJ1ZxNz49Tq for ; Thu, 7 Mar 2024 16:00:00 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709827200; a=rsa-sha256; cv=none; b=nyQkTgPhp5FM97ZdZ8ol+GNKER4nMoCDGUeEcNboQRKsw16wohGE1ciHhiO2T2YMzKx9R0 oyGyIxIJhP16dqAjZMk9hh5NRxt5jtvqCbPNTVIDmj2aGZeilxxihn9gYrf4ZoNYgsCDfO mkPRWtFZruOa9Uppw8Ukd/XhZurL7g52r6D8Yuj8lIjjdCpy3cKZXxqUMOJDQ1EW2FwyKj JblMDAXDo2pWo6siT2b1GgQUrC559VG+bCf4SNpeoqHlRM6/znt1P08koJKvvFA1Qur2dj N20AA8dKo34imkq3jzaYAqEirhBc+6BBMVsToTfw3r7QI8t9PCA2x5LULFDhew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709827200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RRsyGAmQhPcPTxtKsrtqQhdS2vuHpYstErsgp0m5UQE=; b=LKWGuJSb4ZNtzBRAmZIPo1kFF8mfyp06Kq6vZ0z27184BpBT4zcV+ywxIuXw7AyYUaSRgV U4czEvs6BlrQmxaUyy8vUZKny50N+KMVQ7tkueaOmdOw/GDx3dTzmZa0C5zpna8+HeQz3Z CJ4J/z1TfqNG0MnHuAc7hBZo9UJ/BkAluEbsVONDtO1qMnz89Ew19eqeT6Xs98ciBD4/Uw v4H7+PAxXXd8e+i98SglacrEzLKWsfGNxtsETFHNmiW4/qUWlN6nHLfkSNVNZyAp9uP4Me B6vYECNkf4F5gHK9hzpwqgG0qHeTsYTI8x9AXBO77SxTLi9H4H9pGM860tEo8w== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TrDXJ181Tzh8h for ; Thu, 7 Mar 2024 16:00:00 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 427G00Ea052229 for ; Thu, 7 Mar 2024 16:00:00 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 427G00Ep051773 for fs@FreeBSD.org; Thu, 7 Mar 2024 16:00:00 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: fs@FreeBSD.org Subject: [Bug 275594] High CPU usage by arc_prune; analysis and fix Date: Thu, 07 Mar 2024 15:59:57 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 14.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: seigo.tanimura@gmail.com X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D275594 --- Comment #79 from Seigo Tanimura --- (In reply to mike from comment #76) Until my fix gets merged to the official source, you can keep the fix as a = git branch in your local repository and build the kernel out of it. The example steps to keeping the fix along with the official source: - Local fix branch releng/14.0-topic-openzfs-arc_prune-regulation-fix-local - Official FreeBSD branch releng/14.0 - Remote name of my fix repository a130ft A) Clone the git repository and create the fix branch. Take these steps to set up the git repository. Perform them only once. 1. Clone the FreeBSD source repository. The following steps clone the FreeBSD source repository into ~/freebsd-zfs-fix-localtracking.freebsd-src. gitrepo@silver:~ % mkdir ~/freebsd-zfs-fix-localtracking gitrepo@silver:~ % pushd ~/freebsd-zfs-fix-localtracking ~/freebsd-zfs-fix-localtracking ~ gitrepo@silver:~/freebsd-zfs-fix-localtracking % git clone https://github.com/freebsd/freebsd-src.git Cloning into 'freebsd-src'... (snip) Updating files: 100% (99431/99431), done. gitrepo@silver:~/freebsd-zfs-fix-localtracking % cd freebsd-src gitrepo@silver:~/freebsd-zfs-fix-localtracking/freebsd-src %=20 2. Add the remote repository of my fix and create the local fix branch. The following steps add my fix repository as a remote repository and make t= he local fix branch. Also, the local branch tracking the official FreeBSD bra= nch is created to make the tracking easy. gitrepo@silver:~/freebsd-zfs-fix-localtracking/freebsd-src % git remote add a130ft https://github.com/altimeter-130ft/freebsd-freebsd-src.git gitrepo@silver:~/freebsd-zfs-fix-localtracking/freebsd-src % git fetch a130= ft (snip) From https://github.com/altimeter-130ft/freebsd-freebsd-src (snip) * [new branch]=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 releng/14.0-topic-openzfs-arc_prune-regulation-fix = -> a130ft/releng/14.0-topic-openzfs-arc_prune-regulation-fix (snip) gitrepo@silver:~/freebsd-zfs-fix-localtracking/freebsd-src % git branch releng/14.0 origin/releng/14.0 branch 'releng/14.0' set up to track 'origin/releng/14.0'. gitrepo@silver:~/freebsd-zfs-fix-localtracking/freebsd-src % git branch releng/14.0-topic-openzfs-arc_prune-regulation-fix-local a130ft/releng/14.0-topic-openzfs-arc_prune-regulation-fix branch 'releng/14.0-topic-openzfs-arc_prune-regulation-fix-local' set up to track 'a130ft/releng/14.0-topic-openzfs-arc_prune-regulation-fix'. gitrepo@silver:~/freebsd-zfs-fix-localtracking/freebsd-src %=20 B) Maintain the fix branch. Perform these steps to update your local fix branch to the official FreeBSD branch after pulling it from the upstream. 3. Rebase the fix branch onto the official FreeBSD branch you want to track. gitrepo@silver:~/freebsd-zfs-fix-localtracking/freebsd-src % git pull releng/14.0 (snip) gitrepo@silver:~/freebsd-zfs-fix-localtracking/freebsd-src % git switch releng/14.0-topic-openzfs-arc_prune-regulation-fix-local Updating files: 100% (13175/13175), done. Switched to branch 'releng/14.0-topic-openzfs-arc_prune-regulation-fix-loca= l' Your branch is up to date with 'a130ft/releng/14.0-topic-openzfs-arc_prune-regulation-fix'. gitrepo@silver:~/freebsd-zfs-fix-localtracking/freebsd-src % git log (Count and check the fix commits.) gitrepo@silver:~/freebsd-zfs-fix-localtracking/freebsd-src % git rebase -i --onto releng/14.0 releng/14.0-topic-openzfs-arc_prune-regulation-fix-local= ~3 releng/14.0-topic-openzfs-arc_prune-regulation-fix-local (Check the rebased commits.) (Resolve the conflicts as required.) gitrepo@silver:~/freebsd-zfs-fix-localtracking/freebsd-src % --=20 You are receiving this mail because: You are the assignee for the bug.=