Message ID | 20240829062732.1663342-1-wangyang.guo@intel.com |
---|---|
Headers |
Return-Path: <libc-alpha-bounces~patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6A388385EC1C for <patchwork@sourceware.org>; Thu, 29 Aug 2024 06:30:32 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by sourceware.org (Postfix) with ESMTPS id 7566D3858D39 for <libc-alpha@sourceware.org>; Thu, 29 Aug 2024 06:30:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7566D3858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7566D3858D39 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=192.198.163.18 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724913003; cv=none; b=Hos/5vmYFQ3TeF6iAqzyqCOjKuHv88sh3lHrN1WSFYL5nQN1OQfiVqCcA1okjt3Be+ZNmNLCBJuOkV6bYHmSpDSYHL+HMOMYPnHYR3O7OEQdoAHY+fK4EYZSuVRevBN+qkDQlPrz1yCYq29Zd8vCWEm5v9Gi+ecq/qW+l86v2h8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724913003; c=relaxed/simple; bh=60qeToKzExKtL73oK35arR4WGL3kYgYQn9zsBkVxVBM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=e/TUdtoyGPvQzQBosyMXM03cR/U31Vnnb2qZWuK2hJhxzI46n4jhfwEKCMfV1QIT9HerH5jyPar3K2RPuKSb/dBaDnk4Vp9o2hn1nT4i6Us/p322Zlm0cjEmHnbi82k228CdgbdFvzwxVqZeFOL/PcNRGkSW8lyjUoqdSJARchc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1724913001; x=1756449001; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=60qeToKzExKtL73oK35arR4WGL3kYgYQn9zsBkVxVBM=; b=k23g9cVhnQ60Ub3hac9Q/OnOYnu1AkQHH76TqTCFK7rpJu57c9zkDuav mpiNzksmeeMS/5T0485TZXfH/N8IaBeDnvTGq/b9ZpmJjov70do1TxDfu HsUbRHOouczAm/9YVQlXmhbC+yNk2OtBynsS1kQL1ya7Dg0d7t0KH2iCD USQWknxO0z03iA9y+SPheBBSvT4GxbPDjtJMzdtoWMP7qlzHc+E6d4PHG 6jzIgRdLxWzewJrND7JdslJ4JUN+/mPu1JmVhSddGaM3LTCOKxQjWUQZE oUozac+NmlDoSjdh8RzsKnk2LuT4Pqs9Hc2KX5Xx9yh85V549ViAPogQj A==; X-CSE-ConnectionGUID: M2uOMJ/ZTq66rUcr4hoqAQ== X-CSE-MsgGUID: 2v4fYS2BRsyMH+3YUYKf3g== X-IronPort-AV: E=McAfee;i="6700,10204,11178"; a="22998328" X-IronPort-AV: E=Sophos;i="6.10,185,1719903600"; d="scan'208";a="22998328" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Aug 2024 23:30:00 -0700 X-CSE-ConnectionGUID: 1m4xNvZdR726rHxAIAcsfQ== X-CSE-MsgGUID: W3WWQF8OSGW+C8ZGOquAlA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,185,1719903600"; d="scan'208";a="63539120" Received: from linux-pnp-server-11.sh.intel.com ([10.239.176.178]) by fmviesa009.fm.intel.com with ESMTP; 28 Aug 2024 23:29:59 -0700 From: Wangyang Guo <wangyang.guo@intel.com> To: libc-alpha@sourceware.org Cc: fweimer@redhat.com, goldstein.w.n@gmail.com, tianyou.li@intel.com, Wangyang Guo <wangyang.guo@intel.com> Subject: [PATCH v3 0/5] malloc: TCACHE improvement for free and calloc Date: Thu, 29 Aug 2024 14:27:27 +0800 Message-ID: <20240829062732.1663342-1-wangyang.guo@intel.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org |
Series |
malloc: TCACHE improvement for free and calloc
|
|
Message
Guo, Wangyang
Aug. 29, 2024, 6:27 a.m. UTC
This series aims to improve TCACHE performance in memory allocator: simplify TCACHE code path in free() and add TCACHE support for calloc(). --- Changes in v3: - Add comments to the split functions. - Wrap out seldom executed tcache_double_free_verify() as noinline function. - Split out tcache_available() as helper function. - Link to v2: https://sourceware.org/pipermail/libc-alpha/2024-August/159425.html Changes in v2: - _int_free_check() should be put outside of USE_TCACHE. - Merge tst-safe-linking fix into commit#5 to make sure CI check pass. - Link to v1: https://sourceware.org/pipermail/libc-alpha/2024-August/159357.html Wangyang Guo (5): malloc: Split _int_free() into 3 sub functions malloc: Avoid func call for tcache quick path in free() malloc: Arena is not needed for tcache path in free() benchtests: Add calloc function test to bench-malloc-thread malloc: Add tcache path for calloc benchtests/bench-malloc-thread.c | 114 ++++++++----- malloc/malloc.c | 280 ++++++++++++++++++++----------- malloc/tst-safe-linking.c | 81 +++++++-- 3 files changed, 327 insertions(+), 148 deletions(-)
Comments
On 8/29/2024 2:27 PM, Wangyang Guo wrote: > This series aims to improve TCACHE performance in memory allocator: > simplify TCACHE code path in free() and add TCACHE support for calloc(). > > --- > Changes in v3: > - Add comments to the split functions. > - Wrap out seldom executed tcache_double_free_verify() as noinline > function. > - Split out tcache_available() as helper function. > - Link to v2: https://sourceware.org/pipermail/libc-alpha/2024-August/159425.html > Changes in v2: > - _int_free_check() should be put outside of USE_TCACHE. > - Merge tst-safe-linking fix into commit#5 to make sure CI check pass. > - Link to v1: https://sourceware.org/pipermail/libc-alpha/2024-August/159357.html > > Wangyang Guo (5): > malloc: Split _int_free() into 3 sub functions > malloc: Avoid func call for tcache quick path in free() > malloc: Arena is not needed for tcache path in free() > benchtests: Add calloc function test to bench-malloc-thread > malloc: Add tcache path for calloc > > benchtests/bench-malloc-thread.c | 114 ++++++++----- > malloc/malloc.c | 280 ++++++++++++++++++++----------- > malloc/tst-safe-linking.c | 81 +++++++-- > 3 files changed, 327 insertions(+), 148 deletions(-) > Ping. BR Wangyang
On 9/10/2024 9:01 AM, Guo, Wangyang wrote: > On 8/29/2024 2:27 PM, Wangyang Guo wrote: >> This series aims to improve TCACHE performance in memory allocator: >> simplify TCACHE code path in free() and add TCACHE support for calloc(). >> >> --- >> Changes in v3: >> - Add comments to the split functions. >> - Wrap out seldom executed tcache_double_free_verify() as noinline >> function. >> - Split out tcache_available() as helper function. >> - Link to v2: >> https://sourceware.org/pipermail/libc-alpha/2024-August/159425.html >> Changes in v2: >> - _int_free_check() should be put outside of USE_TCACHE. >> - Merge tst-safe-linking fix into commit#5 to make sure CI check pass. >> - Link to v1: >> https://sourceware.org/pipermail/libc-alpha/2024-August/159357.html >> >> Wangyang Guo (5): >> malloc: Split _int_free() into 3 sub functions >> malloc: Avoid func call for tcache quick path in free() >> malloc: Arena is not needed for tcache path in free() >> benchtests: Add calloc function test to bench-malloc-thread >> malloc: Add tcache path for calloc >> >> benchtests/bench-malloc-thread.c | 114 ++++++++----- >> malloc/malloc.c | 280 ++++++++++++++++++++----------- >> malloc/tst-safe-linking.c | 81 +++++++-- >> 3 files changed, 327 insertions(+), 148 deletions(-) >> > > Ping. Ping. BR Wangyang