From owner-freebsd-net@FreeBSD.ORG Wed Jan 28 08:31:22 2015 Return-Path: Delivered-To: freebsd-net@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 B09E2AD for ; Wed, 28 Jan 2015 08:31:22 +0000 (UTC) Received: from phabric-backend.isc.freebsd.org (phabric-backend.isc.freebsd.org [IPv6:2001:4f8:3:ffe0:406a:0:50:2]) (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 93BF9E4F for ; Wed, 28 Jan 2015 08:31:22 +0000 (UTC) Received: from phabric-backend.isc.freebsd.org (phabric-backend.isc.freebsd.org [127.0.1.5]) by phabric-backend.isc.freebsd.org (8.14.9/8.14.9) with ESMTP id t0S8VMB0019577 for ; Wed, 28 Jan 2015 08:31:22 GMT (envelope-from mat@phabric-backend.isc.freebsd.org) Received: (from root@localhost) by phabric-backend.isc.freebsd.org (8.14.9/8.14.9/Submit) id t0S8VMvu019576; Wed, 28 Jan 2015 08:31:22 GMT (envelope-from mat) Date: Wed, 28 Jan 2015 08:31:22 +0000 To: freebsd-net@freebsd.org From: "arybchik (Andrew Rybchenko)" Subject: [Differential] [Request, 20 lines] D1699: sfxge: Remove extra cache-line alignment and reorder sfxge_evq_t Message-ID: X-Priority: 3 Thread-Topic: D1699: sfxge: Remove extra cache-line alignment and reorder sfxge_evq_t X-Herald-Rules: none X-Phabricator-To: X-Phabricator-To: X-Phabricator-Cc: Thread-Index: NTEwZjA3ZGJmNDI3MWUzMTM4NTAyOTUxODg2 X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: , , , MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 08:31:22 -0000 arybchik created this revision. arybchik added a reviewer: gnn. arybchik added a subscriber: freebsd-net. REVISION SUMMARY Remove the first member alignment to cacheline since it is nop. Use __aligned() for the whole structure to make sure that the structure size is cacheline aligned. Remove lock alignment to make the structure smaller and fit all members used on event queue processing into one cacheline (128 bytes) on x86-64. The lock is obtained as well from different context when event queue statistics are retrived from sysctl context, but it is infrequent. Reorder members to avoid padding and go in usage order on event processing. BRANCH /head REVISION DETAIL https://reviews.freebsd.org/D1699 AFFECTED FILES sys/dev/sfxge/sfxge.h To: arybchik, gnn Cc: freebsd-net