From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-180.mta0.migadu.com (out-180.mta0.migadu.com [91.218.175.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 52E4F3F9D5 for ; Wed, 25 Sep 2024 22:47:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727304456; cv=none; b=NC7xZemMXvQMmKCEepjuN0nqfKzNglxkaGXGVaHv/31FjdhNSO50F/bJbW9R91AD9Yh9FjEswacRJ07rWNFBq/TJEEWBHTc8AZM0hmnpH6lWdNazhornsAXBtrjD+JwciYbDrCwxyYZY92P/3/X3RGINuSXPSEx0jMhs0KyXGdk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727304456; c=relaxed/simple; bh=p+9rbjsq50i5itRuXcqvLYoWEZmflkI55q9w/nQRU3Y=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=PAUA2P7XiM0Kzj+XB5hra0viYQAj/W0oDH9eFmvLx4akQMf5Fyg63gK/HKsU+S3oiAR9voQJEour1ZHbpMED/C0Kd6Z2m9eTZfvOvaVGmq4yHo+WQm65Kd3+eKlBKRi55GFTo6ajH1EnmIJZ59xvZ5DaDKHbb0cQ4jxraRT4zSE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=C89w00GP; arc=none smtp.client-ip=91.218.175.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="C89w00GP" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1727304451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=/B1kxCt19FnSzGhJtqVM2Hk/XjnG0/kbcpwDshTcxlg=; b=C89w00GP0fkkJIUQJIETvnm5w9AeH36DChrxj8APCp3D42Qg7tv6rlx9+FeeXuaveIIVnA 2fvmx28RoNDoJIzg305uVgLn9Zum/CjAr0tdcm0hYoG/5K8vRNaaQ47WGNwcRRtOOOS/my v2Wpl7w/Ks1vbsiL294UPYuE2d53E8E= From: Shakeel Butt To: Andrew Morton Cc: Johannes Weiner , Matthew Wilcox , Omar Sandoval , Chris Mason , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Meta kernel team Subject: [PATCH v2 0/2] mm: optimize shadow entries removal Date: Wed, 25 Sep 2024 15:47:14 -0700 Message-ID: <20240925224716.2904498-1-shakeel.butt@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Some of our production workloads which processes a large amount of data spends considerable amount of CPUs on truncation and invalidation of large sized files (100s of GiBs of size). Tracing the operations showed that most of the time is in shadow entries removal. This patch series optimizes the truncation and invalidation operations. Shakeel Butt (2): mm: optimize truncation of shadow entries mm: optimize invalidation of shadow entries mm/truncate.c | 99 +++++++++++++++++++++++---------------------------- 1 file changed, 44 insertions(+), 55 deletions(-) -- 2.43.5