From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH net-next 0/9] devlink: Add support for region access Date: Fri, 30 Mar 2018 10:57:41 -0600 Message-ID: <6d55f271-18f9-9ca5-0dbf-24951dd09978@gmail.com> References: <1522339672-18273-1-git-send-email-valex@mellanox.com> <20180329171359.GA12150@lunn.ch> <962b56c1-d471-97ec-e8e9-18252e809dfe@mellanox.com> <20180329195154.GB15565@lunn.ch> <28b99a08-1967-3044-4010-0faa5d6bfc14@mellanox.com> <20180330143403.GD28244@lunn.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: "David S. Miller" , netdev@vger.kernel.org, Tariq Toukan , Jiri Pirko To: Andrew Lunn , Alex Vesker Return-path: Received: from mail-pg0-f54.google.com ([74.125.83.54]:45376 "EHLO mail-pg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751215AbeC3Q5o (ORCPT ); Fri, 30 Mar 2018 12:57:44 -0400 Received: by mail-pg0-f54.google.com with SMTP id y63so5353635pgy.12 for ; Fri, 30 Mar 2018 09:57:44 -0700 (PDT) In-Reply-To: <20180330143403.GD28244@lunn.ch> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 3/30/18 8:34 AM, Andrew Lunn wrote: >>> And it seems to want contiguous pages. How well does that work after >>> the system has been running for a while and memory is fragmented? >> >> The allocation can be changed, there is no read need for contiguous pages. >> It is important to note that we the amount of snapshots is limited by the >> driver >> this can be based on the dump size or expected frequency of collection. >> I also prefer not to pre-allocate this memory. > > The driver code also asks for a 1MB contiguous chunk of memory! You > really should think about this API, how can you avoid double memory > allocations. And can kvmalloc be used. But then you get into the > problem for DMA'ing the memory from the device... > > This API also does not scale. 1MB is actually quite small. I'm sure > there is firmware running on CPUs with a lot more than 1MB of RAM. > How well does with API work with 64MB? Say i wanted to snapshot my > GPU? Or the MC/BMC? > That and the drivers control the number of snapshots. The user should be able to control the number of snapshots, and an option to remove all snapshots to free up that memory.