From owner-svn-src-all@freebsd.org Fri Oct 30 14:07:26 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 18A6A452963; Fri, 30 Oct 2020 14:07:26 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CN3zK6w6Bz41pS; Fri, 30 Oct 2020 14:07:25 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D097F17963; Fri, 30 Oct 2020 14:07:25 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09UE7PiH060732; Fri, 30 Oct 2020 14:07:25 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09UE7Phw060731; Fri, 30 Oct 2020 14:07:25 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202010301407.09UE7Phw060731@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 30 Oct 2020 14:07:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367165 - head/sys/fs/tmpfs X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/fs/tmpfs X-SVN-Commit-Revision: 367165 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 14:07:26 -0000 Author: mjg Date: Fri Oct 30 14:07:25 2020 New Revision: 367165 URL: https://svnweb.freebsd.org/changeset/base/367165 Log: tmpfs: change tmpfs dirent zone into a malloc type It is 64 bytes. Modified: head/sys/fs/tmpfs/tmpfs_subr.c Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Fri Oct 30 14:02:56 2020 (r367164) +++ head/sys/fs/tmpfs/tmpfs_subr.c Fri Oct 30 14:07:25 2020 (r367165) @@ -75,7 +75,7 @@ SYSCTL_NODE(_vfs, OID_AUTO, tmpfs, CTLFLAG_RW | CTLFLA static long tmpfs_pages_reserved = TMPFS_PAGES_MINRESERVED; -static uma_zone_t tmpfs_dirent_pool; +MALLOC_DEFINE(M_TMPFSDIR, "tmpfs dir", "tmpfs dirent structure"); static uma_zone_t tmpfs_node_pool; VFS_SMR_DECLARE; @@ -129,9 +129,6 @@ tmpfs_node_fini(void *mem, int size) void tmpfs_subr_init(void) { - tmpfs_dirent_pool = uma_zcreate("TMPFS dirent", - sizeof(struct tmpfs_dirent), NULL, NULL, NULL, NULL, - UMA_ALIGN_PTR, 0); tmpfs_node_pool = uma_zcreate("TMPFS node", sizeof(struct tmpfs_node), tmpfs_node_ctor, tmpfs_node_dtor, tmpfs_node_init, tmpfs_node_fini, UMA_ALIGN_PTR, 0); @@ -142,7 +139,6 @@ void tmpfs_subr_uninit(void) { uma_zdestroy(tmpfs_node_pool); - uma_zdestroy(tmpfs_dirent_pool); } static int @@ -506,7 +502,7 @@ tmpfs_alloc_dirent(struct tmpfs_mount *tmp, struct tmp { struct tmpfs_dirent *nde; - nde = uma_zalloc(tmpfs_dirent_pool, M_WAITOK); + nde = malloc(sizeof(*nde), M_TMPFSDIR, M_WAITOK); nde->td_node = node; if (name != NULL) { nde->ud.td_name = malloc(len, M_TMPFSNAME, M_WAITOK); @@ -542,7 +538,7 @@ tmpfs_free_dirent(struct tmpfs_mount *tmp, struct tmpf } if (!tmpfs_dirent_duphead(de) && de->ud.td_name != NULL) free(de->ud.td_name, M_TMPFSNAME); - uma_zfree(tmpfs_dirent_pool, de); + free(de, M_TMPFSDIR); } void