Message ID | DB6PR0801MB20539E364A54B69416DD4598834D0@DB6PR0801MB2053.eurprd08.prod.outlook.com |
---|---|
State | Committed |
Headers |
Received: (qmail 45609 invoked by alias); 18 Oct 2017 11:38:01 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <libc-alpha.sourceware.org> List-Unsubscribe: <mailto:libc-alpha-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:libc-alpha-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 45473 invoked by uid 89); 18 Oct 2017 11:38:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: EUR01-HE1-obe.outbound.protection.outlook.com From: Wilco Dijkstra <Wilco.Dijkstra@arm.com> To: Joseph Myers <joseph@codesourcery.com> CC: "libc-alpha@sourceware.org" <libc-alpha@sourceware.org>, "dj@redhat.com" <dj@redhat.com>, nd <nd@arm.com>, "cmetcalf@mellanox.com" <cmetcalf@mellanox.com> Subject: Re: [PATCH v2][malloc] Use relaxed atomics for malloc have_fastchunks Date: Wed, 18 Oct 2017 11:37:55 +0000 Message-ID: <DB6PR0801MB20539E364A54B69416DD4598834D0@DB6PR0801MB2053.eurprd08.prod.outlook.com> References: <DB6PR0801MB2053F5C639E8EBEE0E90CDB483660@DB6PR0801MB2053.eurprd08.prod.outlook.com>, <alpine.DEB.2.20.1710172304020.16511@digraph.polyomino.org.uk> In-Reply-To: <alpine.DEB.2.20.1710172304020.16511@digraph.polyomino.org.uk> authentication-results: spf=none (sender IP is ) smtp.mailfrom=Wilco.Dijkstra@arm.com; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB6SPR00MB2500; 6:M6mAJdS6u+CsnlWULPQ7YtpKMIrx2ZPGju6C+7nB5gGPvAX4zGW/sinm33w+AfirCGqk0jn7Ba+DEDKDez8FrAbBqj6Z73D7K03AKDE1iB/Bej3zuj8C77Fyj5vXnDayTWBSRWDaUzhBeHmaOgBJbezieNgHFGhMjrg4s2eOrMpCZN5L9XwEYbTzYLHt0F4w1tg84LsAs+lOqZoqRkfMhd2NJVdAdqJsZb7KDl5mQuGiG13mmS2/QgrMjyFVksJl8IF+GhsfZ4esa4s7yxPqZ7vXp2CosDy9b5mtpCbUYc80JRCsD28ODkER7FGpHFPBr2xyh2qqpY6ocWpn8f7uXQ==; 5:hJWHklOhUz9LegNEQfgA4mEaOQfKFiY/LsAyjyFOQ+Re5X+49xF1+3RbTTPo5qGhWYr7xvYxrsUpqF5eFU3OpGQ1cs0yhJKr9YaScfAtem4Rgkx2NGXrkyo+1ggRh+aa8CZbmzuJ1/YJYitINcpeIA==; 24:FVq2sW2diwFrhZwKoug2KwGLTegESTfGDobwvP71uCeEUkh16fb10W1OmNFBLz7+n6BbcF5E0TNF1wAySROpvd/OEwNmt78ZSgAjdgrIv9E=; 7:XN3IcB7naECw2hXWOd/7imyJRR+OZo88AwSb+irsnpNSoBEpyNCjrY2LjGkEMYOh8b7waXYgziS7kLSZN6sBtJ4b1hfC520mTtvWGQUKtRRXVQBEPoOpdGmbOCKLPTVkB9FQpOQj5ceahFw8hFW/m/MRBV9WZiUQuJixRf3iX5dvawbKvA8IzFkCY0JMcXMyH1fnDek8ypu6kL+zkHqEs/1ws7cQsdbxi6lD2T5pY2o= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: aab73db6-0b81-4a20-7b31-08d5161cace8 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(48565401081)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:DB6SPR00MB2500; x-ms-traffictypediagnostic: DB6SPR00MB2500: nodisclaimer: True x-exchange-antispam-report-test: UriScan:(180628864354917); x-microsoft-antispam-prvs: <DB6SPR00MB2500E789878828421B804739834D0@DB6SPR00MB2500.eurprd08.prod.outlook.com> x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(3002001)(6055026)(6041248)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123558100)(20161123555025)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DB6SPR00MB2500; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DB6SPR00MB2500; x-forefront-prvs: 0464DBBBC4 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(39860400002)(377424004)(24454002)(199003)(189002)(72206003)(66066001)(81156014)(74316002)(3280700002)(8676002)(229853002)(6916009)(101416001)(81166006)(2950100002)(7736002)(8936002)(99286003)(55016002)(4001150100001)(86362001)(305945005)(3660700001)(5250100002)(2906002)(14454004)(97736004)(68736007)(54906003)(33656002)(106356001)(105586002)(53936002)(6436002)(4326008)(6506006)(5660300001)(2900100001)(9686003)(25786009)(189998001)(50986999)(76176999)(54356999)(3846002)(102836003)(6116002)(316002)(478600001)(7696004)(6246003); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6SPR00MB2500; H:DB6PR0801MB2053.eurprd08.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Oct 2017 11:37:55.7980 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6SPR00MB2500 |
Commit Message
Wilco Dijkstra
Oct. 18, 2017, 11:37 a.m. UTC
Joseph Myers wrote: > > I think this breaks the build for tilepro. You're using atomic operations > on a bool field, and tilepro only supports atomic operations on 4-byte > objects and gives errors for other sizes. Generic code should only use > atomics on int-size / pointer-size objects unless it knows the particular > architecture supports atomics of other sizes (e.g. through > __HAVE_64B_ATOMICS). I thought there were only issues with types >= 64 bits... Anyway I've updated the type to int - we can always decide not to use atomics for this particular variable. I've committed this which fixes tilepro: 2017-10-18 Wilco Dijkstra <wdijkstr@arm.com> * malloc/malloc.c (malloc_state): Use int for have_fastchunks since not all targets support atomics on bool.
diff --git a/malloc/malloc.c b/malloc/malloc.c index 51db44f..6b78968 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -1673,7 +1673,8 @@ struct malloc_state int flags; /* Set if the fastbin chunks contain recently inserted free blocks. */ - bool have_fastchunks; + /* Note this is a bool but not all targets support atomics on booleans. */ + int have_fastchunks; /* Fastbins */ mfastbinptr fastbinsY[NFASTBINS];