From owner-svn-src-head@FreeBSD.ORG Wed Oct 24 19:11:29 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 6CC79939; Wed, 24 Oct 2012 19:11:29 +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 AE57A8FC0A; Wed, 24 Oct 2012 19:11:28 +0000 (UTC) Received: by mail-qa0-f54.google.com with SMTP id p27so1533804qat.13 for ; Wed, 24 Oct 2012 12:11:27 -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=1gzNXyu5110EkHDot+UgmknEISsOl5cJZwq05EFRuE4=; b=BWwzzPniPhx7gdyCiO0EKjPCnefGmJ5RYjIUFOsHmia0f5Hlnx4onSsQF+8GskC3f6 Bna78n1CwWuzbibTX2xiaOpJ5xUokw9mDixP78sHI/tuiabu1xrkClcKpntaiseUritJ GfOtitLjmvmsKH1KE9Vssrpd7TYgP8yYlLMGNDcCUmWaz0flo8Oppr5Bd/sPbNnkhYcN ms/lruewW0d08JGhiSegwOtrVxaj3eXObiR3GSa7gCjuOr6bCyUtY+jR2Z/+FZ+wpAGE iuz81YTbtXt45Cioorr9+LN1Ld9w6GlvL6wyMCKtnifJ+L79sXa24pOLVxe/Li/r8E6z XIUg== MIME-Version: 1.0 Received: by 10.224.42.8 with SMTP id q8mr7783100qae.77.1351105887698; Wed, 24 Oct 2012 12:11:27 -0700 (PDT) Received: by 10.49.35.37 with HTTP; Wed, 24 Oct 2012 12:11:27 -0700 (PDT) In-Reply-To: References: <201210241836.q9OIafqo073002@svn.freebsd.org> Date: Wed, 24 Oct 2012 12:11:27 -0700 Message-ID: Subject: Re: svn commit: r242014 - head/sys/kern From: Jim Harris To: attilio@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, Adrian Chadd , src-committers@freebsd.org, svn-src-all@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 19:11:29 -0000 On Wed, Oct 24, 2012 at 12:08 PM, Attilio Rao wrote: > On Wed, Oct 24, 2012 at 7:56 PM, Jim Harris wrote: >> 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. > > While you may want to bring CACHE_LINE_SIZE to 64, code in sched_ule > should still use CACHE_LINE_SIZE, as MI code cannot make assumption on > cache line sizes for all the architectures. > Your reasons for using 64 are valid, but a further next step to > cleanup CACHE_LINE_SIZE and then use it properly in sched_ule are due > IMHO. Yes - I agree. I wanted to get some sort of consensus on using CACHE_LINE_SIZE=64 on x86 before moving forward with this change. > Attilio > > > -- > Peace can only be achieved by understanding - A. Einstein