From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751705AbdJZLZv (ORCPT ); Thu, 26 Oct 2017 07:25:51 -0400 Received: from mail-dm3nam03on0116.outbound.protection.outlook.com ([104.47.41.116]:40864 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751173AbdJZLZt (ORCPT ); Thu, 26 Oct 2017 07:25:49 -0400 From: "Stephen Bates" To: Mathieu Desnoyers CC: Daniel Mentz , "logang@deltatee.com" , Jonathan Corbet , Andrew Morton , Will Deacon , linux-kernel Subject: Re: [PATCH] genalloc: Make the avail variable an atomic64_t Thread-Topic: [PATCH] genalloc: Make the avail variable an atomic64_t Thread-Index: AQHTTaaMVAi2tIvJJ0ery9xrTz9EPKL02X0AgABKFgBvJPeAi/yHs7qA Date: Thu, 26 Oct 2017 11:25:47 +0000 Message-ID: <0D12F536-0A4D-4C8D-B2BD-99523BC13672@raithlin.com> References: <1508945574-25984-1-git-send-email-sbates@raithlin.com> <893BAB3D-6B3C-46BB-A16E-E64BF278D90E@raithlin.com> <1655113933.49689.1508978865628.JavaMail.zimbra@efficios.com> In-Reply-To: <1655113933.49689.1508978865628.JavaMail.zimbra@efficios.com> Accept-Language: en-CA, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/f.27.0.171010 authentication-results: spf=none (sender IP is ) smtp.mailfrom=sbates@raithlin.com; x-originating-ip: [70.65.224.121] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;YTXPR0101MB2048;6:21+1UgTEwsUyWxFCFerXM+rS/Bf7akOpwnDnBgLtFvZVJ3M9r9GQs0LxOSjBZGBlkKWUht0hx+/KOgCKITrcLhTwlHTrak1cd5V0eNhrSrzS0J9Eigbxw3z94XnfDrqkQwaFFgaF++vP/X4GlQQrsPv8i7PWdQgjcMN1FKVJwVAZTwdEnnLSUGbLfNxXG4sl1dKU53OGO7O0szlDrBmDIt78Uk5TE6dF+6KfhKDHp/VDl2krFl40tsZQ6+WAy9GyeUmaG9hgIJCcrtfDypoVxRhRT3yEU+4boRytk9NpOJbt4yGlShxAANXyfzNb8T9lxBKCU3Mx39/KKurwTwBF2A==;5:lfgUN4jx0LMURXv2ETTozbY8GhWYfriQBt8nQsUtLV7SYRVWRvY4dua9uw7IKue5e582HY56r6ow2d/EKU460nAmPivdlcqBB/H6jSvaKFWbxYcgIXa8LySgt1sSLa1zL1cqDyzhM0OK7UquuU/+Hg==;24:uVsSueGC4z6RKx0mXbdyyTz+kRnhK2I0Yp8qiwaE7n+pI7aDJnAtUjfpjCeHAM2/gX3hXyQraH2K7aC+8PHUKAuz+7mHH09g9UWGwDXtRoo=;7:v36wypIbUooO4h/CIMzpEepGH5pnSKj3owonM3Tllgx2g5KNmLGsWm31Kw9BX4INOqyMQLsr3RJyyQr2zKr1HDJy7PicCMlwg7h8Pk5SNAYaI6MrkBDb9hgVtTerkVeaLczeqrkiWOf5cAh9GR5OCIjuBc6ntI5Io0s0wfnFm08nJQi12XCkhNdTVgRNm77bqdafN2O819A78SprXss+UP7xulKiQcE8Fw76rGTKKBg= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: dc3e54c6-3e0f-4f7d-4204-08d51c644e2d x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(4534020)(4602075)(4603075)(4627075)(201702281549075)(2017052603199);SRVR:YTXPR0101MB2048; x-ms-traffictypediagnostic: YTXPR0101MB2048: x-exchange-antispam-report-test: UriScan:; x-microsoft-antispam-prvs: 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)(3231020)(3002001)(6041248)(2016111802025)(20161123555025)(20161123562025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123560025)(6072148)(6043046)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:YTXPR0101MB2048;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:YTXPR0101MB2048; x-forefront-prvs: 04724A515E x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(376002)(39830400002)(346002)(199003)(189002)(2906002)(105586002)(2900100001)(53936002)(106356001)(54906003)(33656002)(8676002)(97736004)(5250100002)(305945005)(50986999)(6512007)(6246003)(4326008)(102836003)(7736002)(76176999)(54356999)(58126008)(82746002)(6116002)(81156014)(8936002)(6486002)(3846002)(101416001)(25786009)(83506002)(6506006)(66066001)(36756003)(6916009)(6436002)(2950100002)(86362001)(81166006)(5660300001)(14454004)(3280700002)(83716003)(93886005)(68736007)(316002)(189998001)(3660700001)(478600001)(229853002);DIR:OUT;SFP:1102;SCL:1;SRVR:YTXPR0101MB2048;H:YTXPR0101MB2045.CANPRD01.PROD.OUTLOOK.COM;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: <6198E04BDE6C3A48AA3143666F95619D@CANPRD01.PROD.OUTLOOK.COM> MIME-Version: 1.0 X-OriginatorOrg: raithlin.com X-MS-Exchange-CrossTenant-Network-Message-Id: dc3e54c6-3e0f-4f7d-4204-08d51c644e2d X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Oct 2017 11:25:47.5908 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 18519031-7ff4-4cbb-bbcb-c3252d330f4b X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTXPR0101MB2048 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id v9QBPt2n002900 > We have atomic_long_t for that. Please use it instead. It will be > 64-bit on 64-bit archs, and 32-bit on 32-bit archs, which seems to > fit your purpose here. Thanks you Mathieu! Yes atomic_long_t looks perfect for this and addresses Daniel’s concerns for 32 bit systems. I’ll prepare a v2 with that change. Stephen