From owner-svn-src-head@FreeBSD.ORG Wed Oct 24 18:56:32 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E85F1C87; Wed, 24 Oct 2012 18:56:32 +0000 (UTC) (envelope-from jim.harris@gmail.com) Received: from mail-qa0-f54.google.com (mail-qa0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 592FC8FC08; Wed, 24 Oct 2012 18:56:32 +0000 (UTC) Received: by mail-qa0-f54.google.com with SMTP id p27so1510875qat.13 for ; Wed, 24 Oct 2012 11:56:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=qH5mpS24XFAsscrgWlgNu3rZQWuWvwuQCMIYCM/ZIDk=; b=KL9IYlFWjQcztfttXO4q5BbJ+jjTXU2U5XlGMdcbuhEarrxyJ1ng5hjb/NpjFK5sbk KU2sIR/XFsRDwuWbIkX9HIHT/7IlGWY0saHaEQJ4TGsykuniv2/u30yxHluCoQ9VZ18b YKpxGMwLfaQxw6963pQaRF5TmVqIkxQJdMkvwklrqvTYX6k/9FjPeIeFrkIHC/eLmBB2 z0ZcLbeKcwYkTLFKSERe3kZyqXjfgu8B+0tei1a9KWTd0X2ukLch0zLLI2LizPbM/mUU eW7+lNm1eZWy8EQT4RddXDDzKhKKaVEhZ3uerBgbWq64iije2fuTlHe53PAnsL28OgcB eprA== MIME-Version: 1.0 Received: by 10.224.60.17 with SMTP id n17mr7933135qah.63.1351104991711; Wed, 24 Oct 2012 11:56:31 -0700 (PDT) Received: by 10.49.35.37 with HTTP; Wed, 24 Oct 2012 11:56:31 -0700 (PDT) In-Reply-To: References: <201210241836.q9OIafqo073002@svn.freebsd.org> Date: Wed, 24 Oct 2012 11:56:31 -0700 Message-ID: Subject: Re: svn commit: r242014 - head/sys/kern From: Jim Harris To: Adrian Chadd Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 18:56:33 -0000 On Wed, Oct 24, 2012 at 11:41 AM, Adrian Chadd wrote: > On 24 October 2012 11:36, Jim Harris wrote: > >> Pad tdq_lock to avoid false sharing with tdq_load and tdq_cpu_idle. > > Ok, but.. > > >> struct mtx tdq_lock; /* run queue lock. */ >> + char pad[64 - sizeof(struct mtx)]; > > .. don't we have an existing compile time macro for the cache line > size, which can be used here? Yes, but I didn't use it for a couple of reasons: 1) struct tdq itself is currently using __aligned(64), so I wanted to keep it consistent. 2) CACHE_LINE_SIZE is currently defined as 128 on x86, due to NetBurst-based processors having 128-byte cache sectors a while back. I had planned to start a separate thread on arch@ about this today on whether this was still appropriate. > > > Adrian