From owner-freebsd-bugs@FreeBSD.ORG Mon Apr 6 03:35:07 2015 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E5E50140 for ; Mon, 6 Apr 2015 03:35:07 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CCACA88C for ; Mon, 6 Apr 2015 03:35:07 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id t363Z7eK046280 for ; Mon, 6 Apr 2015 03:35:07 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 199169] [patch] zone "UMA Zones" has bigger size than need Date: Mon, 06 Apr 2015 03:35:07 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: luke.tw@gmail.com X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 03:35:08 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199169 --- Comment #2 from luke.tw@gmail.com --- hi, Dmitry, Thanks for your feedback. That's right, but there is already one uma_cache in the struct uma_zone. Let me do an experiment on sleepq_zone. I have 4-core cpu and the mp_maxid is 3. (kgdb) p mp_maxid $1 = 3 The size of all per-cpu cache in sleepq_zone is 640 bytes. (kgdb) p sleepq_zone $2 = 0xfffff80002bb8000 (kgdb) p sleepq_zone->uz_cpu $3 = 0xfffff80002bb8200 (kgdb) p masterzone_z->uz_size - (0xfffff80002bb8200 - 0xfffff80002bb8000) $4 = 640 So, there are total 5 elements in the uz_cpu array (kgdb) p 640 / sizeof(struct uma_cache) $5 = 5 Only the first 4 elements are used. (kgdb) p sleepq_zone->uz_cpu[0] $6 = {uc_freebucket = 0x0, uc_allocbucket = 0xfffff80002bb1c00, uc_allocs = 73, uc_frees = 0} (kgdb) p sleepq_zone->uz_cpu[1] $7 = {uc_freebucket = 0x0, uc_allocbucket = 0xfffff8000516a800, uc_allocs = 18, uc_frees = 0} (kgdb) p sleepq_zone->uz_cpu[2] $8 = {uc_freebucket = 0x0, uc_allocbucket = 0xfffff80004747c00, uc_allocs = 18, uc_frees = 0} (kgdb) p sleepq_zone->uz_cpu[3] $9 = {uc_freebucket = 0x0, uc_allocbucket = 0xfffff800047a1c00, uc_allocs = 36, uc_frees = 0} (kgdb) p sleepq_zone->uz_cpu[4] $10 = {uc_freebucket = 0x0, uc_allocbucket = 0x0, uc_allocs = 0, uc_frees = 0} -- You are receiving this mail because: You are the assignee for the bug.