Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp764312ybf; Sat, 29 Feb 2020 15:36:05 -0800 (PST) X-Google-Smtp-Source: APXvYqxGYSklKhMQHzK4mrCBm+meUFGbqR36oJO36N+hgHUeGzdXYiwpuNMZR3NcghKJ+e5Mv91E X-Received: by 2002:aca:1215:: with SMTP id 21mr7467998ois.5.1583019365272; Sat, 29 Feb 2020 15:36:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583019365; cv=none; d=google.com; s=arc-20160816; b=kQhGNKLZzXVnEuuWNHD+0fOpOOX1eaGrrtvgkBYv1nDYsQYjUNwe+X+FjCknpU8Xeo eXkV3akDQk0/ItB1N23NCI4JcQDacov6qr1TDe1nZ+7nF809axo/TrTLPRNPo/Uxa/YT F76AjzOhSPxp6ItYdjf+AMHGWwcFb9dolYcoraw7ZVXqeVmHKc+E13ANRuA9TZw1Q0LT B65cJP2DKCSok7rF3R9DYbmoP+kgIdZmxNAwF/U+z90rnmS4x8D3kUI7Y36OYZLdM39+ 6qWj9GOoLv/FU+oKAAjFrog3aSEAu3fSQ5u8oNZeyC4/0pvZiCLsYXxZ7aPSuyvY2MyZ YQ0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=6QmVGzx1aueYaLWNlZU+vqlZbVgGFkUrhADZIonJC58=; b=jbAfyiak6isXFGC/7AHIpgeP73IE2eCs46gIcoME62FBcCEsPVxvLhusYNKFywcKnU nJ+8WTHnaUC4H9dRnU5hmhMIWBpJsKpUZtT2gwaiU7gNjNk57YC4IfoRpAekUEqq0ay/ k2vS1LpS+LXZkIeMFgI4kUsnMcUnIyU09xSeEi1vgyfOE+Dwv1MpS9qJat2wKSD5EqQ+ hVMsmVjf3ZexFuB+R0hvFt3eNRe7pjiExxylOQIKBrUkgwssP4yMdFxDA/lwl3SlmfX/ dvz47OxyK5T3YtfMFsVkS6Eu0OFGxzkeUvyWd/LtiPgu60lBS7W/LqDNfXMmQ4VjqE4T Pp+A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u12si4073444otq.51.2020.02.29.15.35.55; Sat, 29 Feb 2020 15:36:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727530AbgB2X3g (ORCPT + 99 others); Sat, 29 Feb 2020 18:29:36 -0500 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:57445 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726786AbgB2X3g (ORCPT ); Sat, 29 Feb 2020 18:29:36 -0500 Received: from callcc.thunk.org (205.220.128.199.nw.nuvox.net [205.220.128.199]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 01TNTF3h004833 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 29 Feb 2020 18:29:29 -0500 Received: by callcc.thunk.org (Postfix, from userid 15806) id E081B42045B; Sat, 29 Feb 2020 18:29:14 -0500 (EST) Date: Sat, 29 Feb 2020 18:29:14 -0500 From: "Theodore Y. Ts'o" To: Andreas Dilger Cc: linux-ext4@vger.kernel.org Subject: Re: [PATCH 4/9] e2fsck: reduce memory usage for many directories Message-ID: <20200229232914.GD38945@mit.edu> References: <1581037786-62789-1-git-send-email-adilger@whamcloud.com> <1581037786-62789-4-git-send-email-adilger@whamcloud.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1581037786-62789-4-git-send-email-adilger@whamcloud.com> Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu, Feb 06, 2020 at 06:09:41PM -0700, Andreas Dilger wrote: > Pack struct dx_dir_info and dx_dirblock_info properly in memory, to > avoid holes, and fields are not larger than necessary. This reduces > the memory needed for each hashed dir, according to pahole(1) from: > > struct dx_dir_info { > /* size: 32, cachelines: 1, members: 6 */ > /* sum members: 26, holes: 1, sum holes: 2 */ > /* padding: 4 */ > }; > struct dx_dirblock_info { > /* size: 56, cachelines: 1, members: 9 */ > /* sum members: 48, holes: 2, sum holes: 8 */ > /* last cacheline: 56 bytes */ > }; > > to 8 bytes less for each directory and directory block, and leaves > space for future use if needed (e.g. larger numblocks): > > struct dx_dir_info { > /* size: 24, cachelines: 1, members: 6 */ > /* sum members: 20, holes: 1, sum holes: 4 */ > /* bit holes: 1, sum bit holes: 7 bits */ > }; > struct dx_dirblock_info { > /* size: 48, cachelines: 1, members: 9 */ > }; > > Signed-off-by: Andreas Dilger > Lustre-bug-id: https://jira.whamcloud.com/browse/LU-13197 Applied, thanks. - Ted