From owner-svn-src-head@FreeBSD.ORG Wed Oct 31 18:57:40 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 A0B52EAD; Wed, 31 Oct 2012 18:57:40 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 744288FC0A; Wed, 31 Oct 2012 18:57:39 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id e12so1647081lag.13 for ; Wed, 31 Oct 2012 11:57:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=AvJorK+HfkdLFp7+4uuuoHQjfHdKjLDumnPEvXM2dLw=; b=vi0uY7uzPtgKYxkW7zSaZQjIMYToQhgwM/oGSE2zri/dvrZ38qIgjjdcvgMbPuQMgs D3YyIkmayDGrhLKrOQIQt4QitjOb7SWLpRUamWrCjP9j26wUJheBPs/wRNMedCu2wLfH rvGohF/gdPAuJMCJv91TfKHSAmQjS1cnn+St3hpEbZTcZtLcGx5OokxNlmoXr9JvsG71 PxMtFFeX8w2+JbKFJ/R9gTqqlphy8JYnej62L/f0uJ+aevxtITZW8nBCf7CCrbTw9k3F WTphs9VclLav0gxAenHctr2bBF4tswCC7SMe/H+DZgUY1z7omKmtJ7hF3Vfyh4HOm2oi xorA== MIME-Version: 1.0 Received: by 10.152.104.50 with SMTP id gb18mr35273324lab.9.1351709857556; Wed, 31 Oct 2012 11:57:37 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.30.37 with HTTP; Wed, 31 Oct 2012 11:57:37 -0700 (PDT) In-Reply-To: References: <201210311807.q9VI7IcX000993@svn.freebsd.org> <1351707964.1120.97.camel@revolution.hippie.lan> Date: Wed, 31 Oct 2012 18:57:37 +0000 X-Google-Sender-Auth: 55jo7ggJrKjZiPtoA_K-eNeXDJY Message-ID: Subject: Re: svn commit: r242402 - in head/sys: kern vm From: Attilio Rao To: Adrian Chadd Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, Ian Lepore , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org 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, 31 Oct 2012 18:57:40 -0000 On 10/31/12, Adrian Chadd wrote: > On 31 October 2012 11:33, Attilio Rao wrote: > >>> Doesn't this padding to cache line size only help x86 processors in an >>> SMP kernel? I was expecting to see some #ifdef SMP so that we don't pay >>> a big price for no gain in small-memory ARM systems and such. But maybe >>> I'm misunderstanding the reason for the padding. >> >> I didn't want to do this because this would be meaning that SMP option >> may become a completely killer for modules/kernel ABI compatibility. > > Right, but you didn't make it configurable for us embedded peeps who > still care about memory usage. How is this possible without breaking the module/kernel ABI? >> Also, if you look at the modified list of locks I don't think they >> should be too much, I hardly believe ARM UP is going to hurt that much >> from loosing some padding in tdq structures or callout. > > There's a few million more embedded MIPS boards out there with > 16mb/32mb of RAM than target PCs for FreeBSD. > > Would you mind making the padding part configurable and just default > it to "do the padding" ? > That way for the atheros MIPS builds I can turn it off and save on the > memory overhead. This means that we will need to put a black cross on the compatibility between modules and kernel very likely. Changable size locks based on the options are a very bad idea and if they change the size based on the availability of SMP or a main option like that (ie. differently from debugging options) are even a worse idea. Besides the mtx_padalign mutexes should be not be used often in general, that's why I ask people to justify their introduction every time. And as last point, please consider that right now the locks converted are the same that were before, so there is no loss for mips or similar. All that assuming you can actually prove a real performance loss even in the new cases. Attilio -- Peace can only be achieved by understanding - A. Einstein