Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp15576184rwd; Sun, 25 Jun 2023 20:55:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5e157YJ4MY/cRiHZ69ntzcSkhaCjet71Jmhcr8xEXDXu5ETTieMXgBPStPyaPE1JS6vVEG X-Received: by 2002:a17:907:7e88:b0:991:c071:41b9 with SMTP id qb8-20020a1709077e8800b00991c07141b9mr1383987ejc.34.1687751712113; Sun, 25 Jun 2023 20:55:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687751712; cv=none; d=google.com; s=arc-20160816; b=GGm53YBS0wHz10bAxds82PGbi+NGQJ0BZBWXGrbeLYY2fRBux+5yivKt3QnWRft8Oi OF3oMeJt+Dha/ZJK23ysiyGDCxesadIELkMbOBpijUz9AKPdHc0Uw+kgAlNDEapNk83V tqilwaX0RZRKqtCSFFANqDXmw95LhWTcjTcu5EhhVBwnWXWv/FU80+JbkBPQpRsJyRqe RfLmfdJ8s5C9F0pVgidTqrpckqxJVpfM2bfhRe9Slu4XBzB9kDSR9QcCsu6QBHGxkIFX XamltY1ihUfc/XEgrJvruEHFssX5t6qiAmnO3LfM9n2fuMIMm7Y25yxURlzWaF/UtHQT YUjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=Fu4n9jHXHJkJpHSK4BRSmkocgPDfhvvStvvCo/xt2Nc=; fh=SQuLwQLaEk2SFvLO7gQUezFy6d9wrPNa2E435+kJ30M=; b=OioMO3r6mbT8uRXyRMbAfQgp5TxH1iTXpJxXksu3/S88golBiYTsfplXdYXXm1vCGj bE9fUoeftC+2A+YTtDbc/M+Wn6ImOnOxYlT4CQRiZ/8jI5gdkhgHkEgMlUpgpj31TyGu 4EY0BEPQjPkUFHD88huWEiEQz2GGewDHqZXkt9lY/IQ0LeB8Xk4zEOAI03QFi3Swnes8 n0heIm7iFEabOF/hCZqu6UJ9TwOXXvXttqQp5yOc4WugKHLy8X9CeeeZey/CfFkgNwdI W7md6bflh4SOydxc5BCH2JjzOi5YZrzNJJKPhspD/ZuFAaUxCh567tKUba7nA93B+e45 s4ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=HCL26C2A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e17-20020a170906081100b009604e90e38fsi2386734ejd.1005.2023.06.25.20.54.47; Sun, 25 Jun 2023 20:55:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=HCL26C2A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229799AbjFZDeZ (ORCPT + 99 others); Sun, 25 Jun 2023 23:34:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229480AbjFZDeX (ORCPT ); Sun, 25 Jun 2023 23:34:23 -0400 Received: from mail-ot1-x32b.google.com (mail-ot1-x32b.google.com [IPv6:2607:f8b0:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B00111C; Sun, 25 Jun 2023 20:34:22 -0700 (PDT) Received: by mail-ot1-x32b.google.com with SMTP id 46e09a7af769-6b5ef64bca6so2875101a34.3; Sun, 25 Jun 2023 20:34:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687750461; x=1690342461; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Fu4n9jHXHJkJpHSK4BRSmkocgPDfhvvStvvCo/xt2Nc=; b=HCL26C2A/aJv9gHULSICVE2IrBp9fxfck5h9M2pdONm4d9VviTvo/LMcMZadIay68B o3dVKDsBPLN2zn1oW36ewMEhkhmZy/lf2+Ujn+KoBOVyG4i6yMz0wYaeW0bf2tHJm76G yZQVyhUlNZpTCkXj68CorrA/qudyU4TJxfOmDG21BFKo3wxyYuxHHXQ84U6LMzHQnpzu 21oxPkWCpyYoiCFgN1RPjKLHjmHjWsl0cToxFVTb/+ErkbSvVslVycv2/cvynAId5TpC bbJ6waCysywW6Mar7f6uuNWlVUrynYmi4aMO78boZOq7H6aVj/m8YYnhbbxJ7TZ4Jx0M uxlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687750461; x=1690342461; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Fu4n9jHXHJkJpHSK4BRSmkocgPDfhvvStvvCo/xt2Nc=; b=OLseFI8GvnDfsfFhmgpAPQh4YaLLVcRir44xkEGnPa986WDmsTiesSpNUh8dN2gPAx /hyOY7hC0F3AfWzwHNBJeuM3xWQfGRESqMcmNxx2gK5Yakt5vyflxYd9Z0Xs+vTTDNVZ gYnYDNPhXIIs1gHcidOLQDszheXbXzH4563GGd4JI4M5wSD2MWr5KdJCk+8VsSpuy1MU r8qhgLTaQ1Ay9jkX6irQjX1GaNBM1MruoM238lqyAhbJTMlELwKrcEve9T3/sihQmLhq hCCQvjXL1muZApq+nHwgCJP2UrWttst0auR/V4+GAFwfbcsIU/JCQvmoSPUZeMBoHaBo O+nQ== X-Gm-Message-State: AC+VfDz4P+3fijO5yoyZHaxRcWN7UAU/ocQ2azd3bYSWlwSxFttyUQLj +0g/wQ0JgQaNQroJklbcWSE= X-Received: by 2002:a05:6870:8702:b0:1aa:19fb:df64 with SMTP id k2-20020a056870870200b001aa19fbdf64mr22870186oam.54.1687750461543; Sun, 25 Jun 2023 20:34:21 -0700 (PDT) Received: from [192.168.54.90] (static.220.238.itcsa.net. [190.15.220.238]) by smtp.gmail.com with ESMTPSA id hl17-20020a0568701b1100b0019e8deb387bsm3056117oab.53.2023.06.25.20.34.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 25 Jun 2023 20:34:21 -0700 (PDT) Message-ID: Date: Mon, 26 Jun 2023 00:34:17 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH v2] rust: alloc: Add realloc and alloc_zeroed to the GlobalAlloc impl To: Boqun Feng , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Gary Guo , =?UTF-8?Q?Bj=c3=b6rn_Roy_Baron?= , Benno Lossin References: <20230625232528.89306-1-boqun.feng@gmail.com> Content-Language: en-US From: Martin Rodriguez Reboredo In-Reply-To: <20230625232528.89306-1-boqun.feng@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/25/23 20:25, Boqun Feng wrote: > While there are default impls for these methods, using the respective C > api's is faster. Currently neither the existing nor these new > GlobalAlloc method implementations are actually called. Instead the > __rust_* function defined below the GlobalAlloc impl are used. With > rustc 1.71 these functions will be gone and all allocation calls will go > through the GlobalAlloc implementation. > > Link: https://github.com/Rust-for-Linux/linux/issues/68 > Signed-off-by: Björn Roy Baron > [boqun: add size adjustment for alignment requirement] I think that this should go above Link and Signed-off-bys, although I'm not sure if maintainers do it when is merged. > Signed-off-by: Boqun Feng > --- > Miguel, I fold my diff into Björn's original patch and make a v2, it > relies on the other patch: > > https://lore.kernel.org/rust-for-linux/6e61f06f-2411-0bcb-926b-0a6927096f20@gmail.com/ > > So this v2 (if all goes well) is targeted for v6.6, JFYI. > > v1 -> v2: > > * Add size adjustment for align requirement. > > [...] Newbie question, aren't tabs in the commit message verboten? Aside from those two nits everything else LGTM. Reviewed-by: Martin Rodriguez Reboredo