Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1849741imm; Tue, 10 Jul 2018 08:54:22 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcNrfPPcVqtNnP/bs5asZpaQLrteQj/gws//gVhoh9Rj0/FXDKiiwiwyfRWpibVN5phbJNu X-Received: by 2002:a62:954:: with SMTP id e81-v6mr24561092pfd.231.1531238062476; Tue, 10 Jul 2018 08:54:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531238062; cv=none; d=google.com; s=arc-20160816; b=LGFawETTatpc1homoSzY+n7TZ6dldKVuveOB2znQ7ndNYa7njC0DS0Qgg+kum5B+TM d2Zg0sDapG6rBuN7VmLf/0WSx2EIhCLlXkNep0AecFsZ+rfdxzBAJBBF4X9M3yNHrEAh WMwP0s3dW9fcNjHfl3C9oanwMzcKzZZ41/rUZY6VpL+pkwKoyOOnecHjdEU5DHq/K6Jf lRBhQa5Djtj1bwSsRVnLE+PQBZNy/H5mC1Ms0gy8/FWI31F0PF7/xben+FSF1uWvzn63 ET5UsChfbdILFnua9Xgv607TlBU/EWhIKhEDrkYxu+Rmige87gYa816NysVzftNNU+41 OmEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=YLmV+Fy7wGILUFUkdG2vReVLfdnqZvvqKabU8QIR2Oc=; b=SdQ5hPRnMHPXMiwel5BU9Lj8N3EYRK73ICgMC3mwtWDlrxbgGcoIhU+8kxDMAoHWcK l1ugk0g/Ayzye4b5J7NZVTeHXCInUosJTd6R2/XuvglYqaPABXGUb8vQkz/zEkR+WeTf I6nEX3/1c1ITMi1Rw94Zx9891PWA1HdEMEuNJNDaI3wBm4qD/KUO1xNMXB6gKG37r0WA 3196SBHFhxhe8mHf09PfU82X3DAW86i+k9sZmFd6FMHynvayPJHHwCF8YYB9ugzbouo8 SHUF7cwoQXzsi5W7+Q8A8ZY5G3klRB4FSCm4Xs7BNzOwqtsCcLtPIhxlJfh8Z7W+mfA2 rO0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=egTXtHwG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d36-v6si17128293pla.484.2018.07.10.08.54.06; Tue, 10 Jul 2018 08:54:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=egTXtHwG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934204AbeGJPxY (ORCPT + 99 others); Tue, 10 Jul 2018 11:53:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:53750 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933976AbeGJPxX (ORCPT ); Tue, 10 Jul 2018 11:53:23 -0400 Received: from localhost (unknown [213.57.183.250]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3105A208F7; Tue, 10 Jul 2018 15:53:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1531238002; bh=YLmV+Fy7wGILUFUkdG2vReVLfdnqZvvqKabU8QIR2Oc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=egTXtHwGhrX7PVghah+YFyMa2oHlDDLnGx2CEOtiXaEGhtbN4sWA2erigi9BY50xB Mx+IMogyn1ZQxk3QkM/tchcaMfzDOUoy2ztjzd4X8hXrV1DDToa6CozaUpsfuhC36u XWZZCENmZMKPN2XD9LriI+Vu0ehorycvb16z9e/g= Date: Tue, 10 Jul 2018 18:53:18 +0300 From: Leon Romanovsky To: Bart Van Assche Cc: "jan.dakinevich@virtuozzo.com" , "linux-kernel@vger.kernel.org" , "den@virtuozzo.com" , "jgg@ziepe.ca" , "linux-rdma@vger.kernel.org" , "dledford@redhat.com" , "khorenko@virtuozzo.com" Subject: Re: [PATCH] ib_srpt: use kvmalloc to allocate ring pointers Message-ID: <20180710155318.GI3014@mtr-leonro.mtl.com> References: <1531144268-25361-1-git-send-email-jan.dakinevich@virtuozzo.com> <20180710053944.GN3014@mtr-leonro.mtl.com> <5196ea6e33825dd5fde58d23b38630afafcb77f1.camel@wdc.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yuedfix5hmtMJRO4" Content-Disposition: inline In-Reply-To: <5196ea6e33825dd5fde58d23b38630afafcb77f1.camel@wdc.com> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --yuedfix5hmtMJRO4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jul 10, 2018 at 03:08:38PM +0000, Bart Van Assche wrote: > On Tue, 2018-07-10 at 08:39 +0300, Leon Romanovsky wrote: > > On Mon, Jul 09, 2018 at 04:51:08PM +0300, Jan Dakinevich wrote: > > > An array of pointers to SRPT contexts in ib_device is over 30KiB even > > > in default case, in which an amount of contexts is 4095. The patch > > > is intended to weed out large contigous allocation for non-DMA memory. > > > > kvmalloc* doesn't "weed out" large contiguous allocations, but tries to > > allocate them and gracefully fallback to vmalloc if kmalloc fails. > > > > More on that, for allocations less than page (64KB for PowerPC), it will > > not call to vmalloc at all, which is fine too, because pages granularity. > > > > If you want to get rid of "contiguous allocations", use vmalloc instead. > > vmalloc() has a very significant disadvantage compared to kvmalloc(): with > vmalloc() it is guaranteed that memory allocations will be slow. That's not > the case for kvmalloc() if the number of bytes that is allocated is small > enough. Bart, I'm not arguing, just pointing that the commit message doesn't reflect actual change. Thanks > > Bart. > > > > --yuedfix5hmtMJRO4 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBAgAGBQJbRNZuAAoJEORje4g2clinw5cP/0FbpRGJuK+4GFge8yXm1YAj gkEFjH+lntodg9luLb8ChrZXEOFJxHhfEHUS1yVk3xTjYrlrVi0er0G9o6mwEPel l+ndKGmaP7Uy2tfa0PKy54cSUpYTvBSlPrgJk+EoPqvSGLPpvjduZUOGJEaBChcr iWcYIxFgrf/TMOfDT+weJ/J5xtolIXfOhJ1GZAhJsj1kAJ0wu+14CNddiKCgy6pT dQoqX1AGdq0mt5YMExVIBiFk8wqeIs9F8fplHOatnCrF1SdsG/e3eSYJm7B4vihl we/BmTYe4xnsR5rhovghmwE00pT/mxUc4WYu+re+zh3Z90YIWjp/q1BV2heagBin 9rL2Z84cZAGVDlfE01Z2hRhQ9aKhOioZD22Dv/TzZNSDDWkkFuIugTf5cudb9lK3 /p/B6FNMKnhzIvqZdFh2jmM8CMfafLumEsv+Xk9INcB1EpoWioQNldELqxrGG3nM ttToQAuJQheOoxJnzBp5RGUoILvVYKXBPN8BRy80+oNLDSscCz2JORUeTynggeMb yjYkUAyfcLgshgJlOfrB6DqVOdlZvjVVkLh/3TibOqmFipb0kulNARKrVmCzsNmf jkKXqKJdX1itNNr7RIZocBjbOwpYYLg4iz4CDQIo2EoItHYMnyAvpUxTJTR0w6k9 5noxFnCbhWbtdsKPT6ny =5ixS -----END PGP SIGNATURE----- --yuedfix5hmtMJRO4--