From owner-svn-src-projects@FreeBSD.ORG Thu May 12 21:32:45 2011 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF0CE106566C; Thu, 12 May 2011 21:32:45 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id AEB2D8FC1B; Thu, 12 May 2011 21:32:44 +0000 (UTC) Received: by wyf23 with SMTP id 23so2027159wyf.13 for ; Thu, 12 May 2011 14:32:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=qf54ax5MKYgCYUEUJu7nk7hcjwQPPnmM9XMb3kD3zOE=; b=HcWBwN+bUIwwC+4vOycvcVoCdsbB7lIAgHUNgDjwJhBjWxGpo0vntzKA+B6osswNAB GkBiBZ5niqr2Can0Kund1mnO3pS3kD517FC7TwK0Na553qroHJccinatKY7O+AdNGGhd cm5OaIvvgaTtIvUeB8aPk4YZNyl8jPAx3ZleU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=q98NUu3IkpKD+p6w5w4phegfu1ZOQxBuSbKMHUopLL7IjKbex314gx95vnHmoe7Nte QMcYQbFwV3IXSkPzl7DNdiupBXY6hWfZSor8n+iNXWAOHY9bs00TzMpdnrd1Y33LwoAx 1saXTXVQINLfHfHu9VPAuolF0FGgpy7pJaFAs= MIME-Version: 1.0 Received: by 10.216.220.150 with SMTP id o22mr684688wep.59.1305235963501; Thu, 12 May 2011 14:32:43 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.216.172.196 with HTTP; Thu, 12 May 2011 14:32:43 -0700 (PDT) In-Reply-To: References: <201105080039.p480doiZ021493@svn.freebsd.org> Date: Thu, 12 May 2011 14:32:43 -0700 X-Google-Sender-Auth: OoekfOMWM1uTkelWQoEg4U2pdH4 Message-ID: From: mdf@FreeBSD.org To: Attilio Rao Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: src-committers@freebsd.org, Artem Belevich , Oleksandr Tymoshenko , Bruce Evans , svn-src-projects@freebsd.org, Warner Losh Subject: Re: svn commit: r221614 - projects/largeSMP/sys/powerpc/include X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 May 2011 21:32:46 -0000 On Thu, May 12, 2011 at 2:12 PM, Attilio Rao wrote: > 2011/5/12 Artem Belevich : >> On Thu, May 12, 2011 at 10:05 PM, Attilio Rao wrot= e: >>> I spoke in person with Artem and in the end I just decided to make the >>> smallest possible subset of changes to fix the _long on 32 bits and >>> then "completed" (as some of them already exist today) the macro >>> converting the arguments to u_int stuff: >>> http://www.freebsd.org/~attilio/largeSMP/mips-atomic2.diff >> >> Attilio, >> >> Let's get back for a second to the original issue you had that propted >> you to do atomic ops changes. >> If I understand you correctly, your code was passing cpuset_t* as an >> argument to atomic_something_long and that caused compiler to complain >> that cpuset_t* is not uint32_t*. >> >> Could you post definition of cpuset_t ? >> >> It's possible that compiler was actually correct. For instance, >> compiler would be right to complain if cpuset_t is a packed structure, >> even if that structure is made of a single uint32_t field. > > It doesn't do the atomic of =A0cpuset_t, it does atomic of members of > cpuset_t which are actually long. Isn't this an argument for making it an array of u_int, even though it's marginally pessimal on amd64 and other 64-bit arches? There is guaranteed support for a int-sized (or perhaps 32-bit sized) atomic op. Cheers, matthew