From patchwork Fri May 5 18:37:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 13232957 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8DE6C77B7C for ; Fri, 5 May 2023 18:38:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 62FFF6B0095; Fri, 5 May 2023 14:38:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5E0566B0096; Fri, 5 May 2023 14:38:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4CFC76B0098; Fri, 5 May 2023 14:38:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by kanga.kvack.org (Postfix) with ESMTP id 3ABFC6B0095 for ; Fri, 5 May 2023 14:38:00 -0400 (EDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id F060861179; Fri, 5 May 2023 18:37:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 12A33C433EF; Fri, 5 May 2023 18:37:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683311879; bh=pZUaTTVkVO1QhEY4Czhvk8wgXtXy9SD+2I1AGI0BYwU=; h=Subject:From:To:Cc:Date:From; b=HeblO6WBK57Zn/gDOyLK4dUmHLD9+2Oi5+rtHh8iZdyBV/lhg+lrn6ltZhh446ktw qR7aI6gx3U5HN9AZ+XefGt/XHokwN9ZuWjxrdM/DLudYnopGLYAQmgdr9tckIhT2dT kpQHGJ692iZR1q0zDWuAGtZUPk0d2ioLieP4yNWXMDGjfS5rNPZOC1F/xpg5AcuN9z OGNHQa/9vFumsq1jWu7bV2iF9V7ve5ol9k3r8UhXtJEclg7aNfmMMVELtcxWEcL/jK FWSPIScUme0rKtDDa2DHcFgCvtlfDNPimBSZRR+LzxUa2xhWuaKBLpjDsc2kMOQh2F SWYWchWeL7/fg== Subject: [PATCH v2 0/5] shmemfs stable directory cookies From: Chuck Lever To: hughd@google.com, akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Date: Fri, 05 May 2023 14:37:47 -0400 Message-ID: <168331111400.20728.2327812215536431362.stgit@oracle-102.nfsv4bat.org> User-Agent: StGit/1.5 MIME-Version: 1.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The following series is for continued discussion of the need for and implementation of stable directory cookies for shmemfs/tmpfs. Based on one of Andrew's review comments, I've split this one patch into a series to (hopefully) reduce its complexity and make it easier to analyze the changes. Although the patch(es) have been passing functional tests for several weeks, there have been some reports of performance regressions that we still need to get to the bottom of. We might consider a simpler lseek/readdir implementation, as using an xarray is effective but a bit of overkill. I'd like to avoid a linked list implementation as that is known to have significant performance impact past a dozen or so list entries. Changes since v1: - Break the patch up into a series Changes since RFC: - Destroy xarray in shmem_destroy_inode() instead of free_in_core_inode() - A few cosmetic updates --- Chuck Lever (5): shmem: Refactor shmem_symlink() shmem: Add dir_operations specific to tmpfs shmem: Add a per-directory xarray shmem: Add a shmem-specific dir_emit helper shmem: stable directory cookies include/linux/shmem_fs.h | 2 + mm/shmem.c | 213 ++++++++++++++++++++++++++++++++++++--- 2 files changed, 201 insertions(+), 14 deletions(-) -- Chuck Lever