Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp836451pxb; Wed, 13 Jan 2021 17:53:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJzNvMLLspFILBJuvIJ3m/1LEKy63nBnDeLorEgN4xZp7rOC4yN0+qadrJw/sB2+yZzBm8kD X-Received: by 2002:a05:6402:17cb:: with SMTP id s11mr3856289edy.119.1610589205996; Wed, 13 Jan 2021 17:53:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610589205; cv=none; d=google.com; s=arc-20160816; b=LzUmUPpzybF4SbJTF6thb3gNx9MD0S9f6MIV7GLXeNvuKqW9uU2JXk4Hz/+iR+DzuI kKKwwFGswNCSBUJUq5Kvbe3YlDj4Y4TCzb/yxD1c73M47MvVYt0IqFomCJmYcPpdDycA /zMW7LMqS/6QjGgGFGu9hKsKmdcwYx9rAYck1JPX71dc2eHCwUs4C70MznqsPlYMcyB2 ymo8B2Y/QPggQRi7+Lww+OI/XcqkCVjz+GfPyW0p56/pBahwf67hZ8aZzZYRchqepgWq CPNIAY3dw2eP+JUgXVIjFi2FwvmevA0g0xxxnv0uVNLmapOu+mP9Fd/jH6mgmjVrLcbJ r/3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:mime-version:message-id:date :sender:dkim-signature; bh=0o/vA1AfNKxyGaMPPfQg0SvsINA0ByEgrAbYEZaT+Ow=; b=hZ5FTejDi/JUakdXy3Ojz/tnXf6zH3RqlRnhITtLWAiJIb4TqrhMc8P5g2YeXyS7iy 3OKQrmiXHoBagG81ObnjgFoEmgoq1UKyQ1xnC9FAkZQbd9fzBAax1bK+UUwA9A6Oj555 /Jpr+FvfUTWgELdg95vGlW/ZxjyR/xl0b96QjAzppvAv69ATSSu9ioI1VPRVZsxyzNZJ 6s/pf9yk7vIsTHtZl+OsnLeP7ra9TOSQouEXdFYOKiuXjeCYO0z3PEfLS53QxJQZgrAM gJPZNGi6R9W0xuXppiCxmD0QAseYdjae41hmzSPMs9oE6l7hpnMzCt5eIYTUODNYf2vq 5dNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=CVUuO+20; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q8si1694279ejj.24.2021.01.13.17.53.01; Wed, 13 Jan 2021 17:53:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=CVUuO+20; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726198AbhANBuB (ORCPT + 99 others); Wed, 13 Jan 2021 20:50:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729832AbhANA23 (ORCPT ); Wed, 13 Jan 2021 19:28:29 -0500 Received: from mail-qk1-x749.google.com (mail-qk1-x749.google.com [IPv6:2607:f8b0:4864:20::749]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3C1BC061795 for ; Wed, 13 Jan 2021 16:27:45 -0800 (PST) Received: by mail-qk1-x749.google.com with SMTP id a17so3002715qko.11 for ; Wed, 13 Jan 2021 16:27:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:message-id:mime-version:subject:from:to:cc; bh=0o/vA1AfNKxyGaMPPfQg0SvsINA0ByEgrAbYEZaT+Ow=; b=CVUuO+20ns0ZdokW3B55E6xkRruNaFweTHsuWjgfUcMJShZE1Zrjf16Eee5zwHMbO/ q5Krh5wM+6VyZtugOkHpQqIa7kfwx9Yh6SBgW/WeTCbRlm79InpH9qEPEAAYi71MhFGx HRuLX0XXblgHVEdWk8LvMyolCix1h3x8s9tLnNlLGSjbSvCCliAg1nCh0ARqXqZj6vwp /UEd9ZGtWkBpu2+iOfd0OFI1e2LI1AVMTMDwWnv3m17SUdoDU2o6s05dg9eNTp2kxPx7 1IORgwVv6lVkY+ucYwX/lmRqCh1TEyn9y+lYeLDwEGnvDb5S46TOwlul4VfL5Km13haI swQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:message-id:mime-version:subject:from :to:cc; bh=0o/vA1AfNKxyGaMPPfQg0SvsINA0ByEgrAbYEZaT+Ow=; b=cv12NaKwpKGSVFaEdMPUz2/CBVERbiKkewx3Tww7AVOyt5m1643vIm38aodrGjXfLx Y+uy1DwWS7jcVkGObSm2DWjIFvFrfD4f6SortR/u881WQlo0CcA3Uj0mhB3XFz/xIyjh MjFmkGeFYtST1+UUlQQYwm8BP9Zp2+VHqTgtFa2l96lNNI1CfBtA+xBvYl8vlyGwB8fB 4aYepMMaCJpJWO2x49A08nydU8eCkMsYLPkFlNHjM89vvItLdNVg4fpfnZzsH2TCDVv+ LK2j+T+2brmmsme41c0OM0VcqGbVmSoBk3YIAPhTco8LFk+3Z86lmwbVJO9hy6hczeX3 FpIw== X-Gm-Message-State: AOAM531nz+CuCCuLA8YmNwjkosx0Kgwu22QUYHlYMXQO0uBDYf/4aM5+ PPU74ccj5nSsAhRF6Vd/igq+mMnfKGXlpnBne7z+4k5UYRkpkFXKUthMWyCgEQjpRf2qXGM32v+ fEXDSSNweIvCYi2UNKZn08jU7Flfzzq6zzNlqRWK7P2cHIBKbFyBNVJ2+8IU/Uu70bh+mhXaSZ7 ui9SBUVrs= Sender: "saranyamohan via sendgmr" X-Received: from saranyamohan.svl.corp.google.com ([2620:15c:2cd:202:f693:9fff:fef5:75ee]) (user=saranyamohan job=sendgmr) by 2002:a25:99c2:: with SMTP id q2mr6750017ybo.265.1610584064871; Wed, 13 Jan 2021 16:27:44 -0800 (PST) Date: Wed, 13 Jan 2021 16:27:18 -0800 Message-Id: <20210114002723.643589-1-saranyamohan@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.30.0.284.gd98b1dd5eaa7-goog Subject: [RFC PATCH v1 0/5] Add threading support to e2fsprogs From: Saranya Muruganandam To: linux-ext4@vger.kernel.org Cc: tytso@mit.edu, Saranya Muruganandam Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org This patch set adds the infrastructure to support threading to libext2fs. It makes the unix_io I/O Manager thread-aware. Wang's parallel bitmap code has been adapted to use the new threading infrastructure. The code has been tested with TSAN and ASAN built into gcc 10.2: configure 'CFLAGS=-g -fsanitize=thread' 'LDFLAGS=-fsanitize=thread' make clean ; make -j16 ; make -j16 check configure 'CFLAGS=-g -fsanitize=address' 'LDFLAGS=-fsanitize=address' make clean ; make -j16 ; make -j16 check As I(tytso) needed to excerpt out some of the changes to generated patches in "Add configure and build support for the pthreads", the full patch series can be found in git: git fetch https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git pthreads Changes with V1: Fix review remarks for "ext2fs: parallel bitmap loading". Tested stat_mutex performance on instance with 60 CPUs and fragmented 3TB Local SSD. No noticable contention seem for the stat_mutex. Theodore Ts'o (4): Add configure and build support for the pthreads library libext2fs: add threading support to the I/O manager abstraction libext2fs: allow the unix_io manager's cache to be disabled and re-enabled Enable threaded support for e2fsprogs' applications. Wang Shilong (1): ext2fs: parallel bitmap loading MCONFIG.in | 12 +- aclocal.m4 | 560 ++++++++++++++++++++++++++-------------- configure | 213 ++++++++++++--- configure.ac | 24 ++ debugfs/debugfs.c | 6 +- e2fsck/unix.c | 2 +- lib/config.h.in | 83 +++++- lib/ext2fs/ext2_io.h | 3 + lib/ext2fs/ext2fs.h | 9 + lib/ext2fs/openfs.c | 2 + lib/ext2fs/rw_bitmaps.c | 332 ++++++++++++++++++++---- lib/ext2fs/test_io.c | 6 +- lib/ext2fs/undo_io.c | 2 + lib/ext2fs/unix_io.c | 156 +++++++++-- misc/dumpe2fs.c | 2 +- misc/e2freefrag.c | 2 +- misc/e2fuzz.c | 4 +- misc/e2image.c | 3 +- misc/fuse2fs.c | 3 +- misc/tune2fs.c | 3 +- resize/main.c | 2 +- 21 files changed, 1093 insertions(+), 336 deletions(-) -- 2.30.0.284.gd98b1dd5eaa7-goog