Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4655331pxj; Tue, 25 May 2021 13:06:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzulcxj1/eXtbCgZfD68MTN0CS68N5jjp/kK28LiD+HC8ppNHlm1HLvISCiSfHZhTxjc95K X-Received: by 2002:a50:d69c:: with SMTP id r28mr33549200edi.64.1621973201134; Tue, 25 May 2021 13:06:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621973201; cv=none; d=google.com; s=arc-20160816; b=nuSBDE0g8BE5yTz7XHT5WbFdRpxJOv5/zUXV/CZ7rk9gjAwcytsaDrM/qF5OClZf8X smUTMhI2QlJXK2LbYiwaBxoCldhfrdIYdcWtpQxpr4CpAHKxCFk7BYoJupAewS4FOaBE gfAgxY1knm4moJDfRCsEtcY8rJFMJ++MIw89bfSTdHGAjCYTsvFNo26nrQZV+6VWGmSG LSwZB0y9qOB1tl4kWKqrWal9RcSe6GPzvrj1egAMgweL1FMjfSBDVGaHAawZMh1oAps/ 9lC5+XrbhCj5lWLXble6lbRKUnNX4hN+APgCa+AbIe7C2Wh5VT4SsUVFm9SGGfKJvw+D 5UUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=EByYVc8xcFwO+oY1MhivzvhCieKW2Bh5a8hooEUfeZo=; b=K2eGHDbQS3AC+wiq5K5VMw5vljzY+aN1yl8qCmijHtsJlGjxdJqNkaWO8qfMpzC3Ja jW9fbG3ca55go/iHT+EDCn6//bapBobJMqloPs0aa9Cv+kDBkwZiM5Q7GqpLvm/TAIhj YcW23Y3XNHHUK6RDRYzHUUZt8sMGHEqe6XXsMocDl9Q9A6y2FKcrhnZ8x8jgdjaUTW+2 KDp3Io0AyKS0w37r6l62GkIFvAwb2XoLPdgmymOmG1QXxE6ZHK4MDkEDWJw/HedIGNRX mOTvCecPUAbJqjoc0Go2YYuFOuhQmMKf4Rde/9Yf90h2nYq7Ei525U6Ukijk5PpoEEc2 8PXA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id da5si17112246edb.393.2021.05.25.13.06.12; Tue, 25 May 2021 13:06:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233629AbhEYRQ7 (ORCPT + 99 others); Tue, 25 May 2021 13:16:59 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:47182 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232349AbhEYRQz (ORCPT ); Tue, 25 May 2021 13:16:55 -0400 Received: from cwcc.thunk.org (pool-72-74-133-215.bstnma.fios.verizon.net [72.74.133.215]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 14PHFASB001063 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 25 May 2021 13:15:11 -0400 Received: by cwcc.thunk.org (Postfix, from userid 15806) id 7B1CB15C3C67; Tue, 25 May 2021 13:15:10 -0400 (EDT) Date: Tue, 25 May 2021 13:15:10 -0400 From: "Theodore Ts'o" To: Jan Kara Cc: Xing Zhengjun , kernel test robot , LKML , lkp@lists.01.org, lkp@intel.com Subject: Re: [LKP] [ext4] 05c2c00f37: aim7.jobs-per-min -11.8% regression Message-ID: References: <20210227120804.GB22871@xsang-OptiPlex-9020> <20210520095119.GA18952@quack2.suse.cz> <20210521092730.GE18952@quack2.suse.cz> <20210525092205.GA4112@quack2.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210525092205.GA4112@quack2.suse.cz> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 25, 2021 at 11:22:05AM +0200, Jan Kara wrote: > I actually have to check whether the regression is there because of the > additional locking of the buffer_head (because that's the only thing that > was added to that code in fact, adding some atomic instructions, bouncing > another cacheline) or because of the checksum computation that moved from > ext4_handle_dirty_super() closer to actual superblock update under those > locks. Hmm, yes. So the other thing we could try doing might be to drop s_orphan_lock mutex altogether and instead use the buffer_head lock to protect the orphan list. In actual practice the orphan list modifications are the vast majority of the times when we need to modify the superblock, so we could just take the buffer_head lock a bit earlier (when we take the s_orphan_lock) and release it a bit later and thus avoid the cacheline bounce. What do you think? > If the problem is indeed just the checksum computation under all those > locks, we can move that to transaction commit time (using the t_frozen > trigger - ocfs2 uses that for all metadata checksumming). But then we have > to be very careful with unjournaled sb updates that can be running in > parallel with the journaled ones because once you drop buffer lock, sb can > get clobbered and checksum invalidated. Also there's the question what to > do with nojournal mode - probably we would have to keep separate set of > places recomputing checksums just for nojournal mode which is quite error > prone but if it's just for sb, I guess it's manageable. We lived without the orphan list in ext2 for a long time, and without the journal, whether the orphan linked list in inode->d_time would be anything approaching consistent is a major question in any case. One approach then might be to drop the orphan list in nojournal mode altogether.... - Ted