From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 85EBBA034D; Mon, 3 Jan 2022 19:17:45 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4012F40042; Mon, 3 Jan 2022 19:17:45 +0100 (CET) Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) by mails.dpdk.org (Postfix) with ESMTP id B86174003C for ; Mon, 3 Jan 2022 19:17:44 +0100 (CET) Received: by mail-pj1-f41.google.com with SMTP id y16-20020a17090a6c9000b001b13ffaa625so38356174pjj.2 for ; Mon, 03 Jan 2022 10:17:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DBmHsESb3YjTQRrPALBxlGXRX8XO3FUkP7UGHdoZuF4=; b=44Rz9LhVZAPZTVF8asUGHS9FiTqA8zsqbtqKYhD4jD/C086ONLGUjWXzIgSSVe+J9r RneL7hU19zeNTPsUoILE/wZIq7don5fvfd4q3cqmDPbxNqK+S+WLcoHfNLOtmmcZOpjz CCncnsCEyI/UyuAYbvjAQL1JTJHFB6CnL7N30ieHHanyw1iLcC0x7m+yQhK4dJmT7yj/ rWoXnAcHXFREfW0Oa0OalbnMC8WIuYtyD5E4ly7p4JrpjtelfsJ8DEJttfMuIibCaqv8 9FPJlJeLYEADoT5SrrjeSyNIqE7x/dpS0HCGDU5WegG1TXcua0VTXtzP2+706vmwYISN dsuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DBmHsESb3YjTQRrPALBxlGXRX8XO3FUkP7UGHdoZuF4=; b=2wUJ4yssuJl398szWCumig8HIkCEvW1aV1syWXTdP1+QDioLFoAcO8YyiJrKbdMdkb 14w84QgtGqcahhA3MZcpeUuSMjYqQ8zAp31NVmwG71CKPXMVimFKLwyocUhRJBXIeFfK +V2U/UJ1JXdaM6BUTR3hjgG2q9ZukSsUyocS3iXOSj+MX4lHn5uwEf3DioDuHnUZPXyh AL1PArfYIjruAU/AD9VjH1Fjwh+/ELx/iGz+t4AjYwETG1KZENmSipzofA9h5c7qjl4K gRtQM/s9rBd1Y8O9gCJ1N6fA/r8OnHvWNROy2r3+EpX5IvMdyZ+GaIgsDZYVx6yp09UY dH1g== X-Gm-Message-State: AOAM531XvAHqYPOAJJ29CJ2TU7LWGkAZJOaZXMHwPZtoxqD7iL1alij2 OGTUdWTrbzStcur/qrXnjzao3e7AdH6lIw== X-Google-Smtp-Source: ABdhPJwiwqI2PpzPkl8BU8Nvno4n75ObRVbZeEDpasEmkvdTpzfvQKxNYPtv71gye5KsZ7c+GTE7Fw== X-Received: by 2002:a17:902:ea0d:b0:149:bef4:7f8f with SMTP id s13-20020a170902ea0d00b00149bef47f8fmr4545345plg.46.1641233863904; Mon, 03 Jan 2022 10:17:43 -0800 (PST) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id mi5sm40545182pjb.21.2022.01.03.10.17.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jan 2022 10:17:43 -0800 (PST) Date: Mon, 3 Jan 2022 10:17:41 -0800 From: Stephen Hemminger To: Elena Agostini Cc: "dev@dpdk.org" Subject: Re: [PATCH v1 3/3] gpu/cuda: mem alloc aligned memory Message-ID: <20220103101741.711319ab@hermes.local> In-Reply-To: References: <20220104014721.1799-1-eagostini@nvidia.com> <20220104014721.1799-4-eagostini@nvidia.com> <20220103100520.66677c3f@hermes.local> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Mon, 3 Jan 2022 18:15:11 +0000 Elena Agostini wrote: > > Alignment only makes sense if power of two. The code should check that and optimize > > for that. > > > > The alignment value is checked in the gpudev library before > passing it to the driver. > > Adding this kind of checks in the driver has been rejected in the past because it was > considered dead code (the library was already checking input parameters). > > Let me know what are the preferred options. Driver could use the mask instead of slow divide operation.