netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: Jiri Pirko <jiri@resnulli.us>,
	netdev@vger.kernel.org, valex@mellanox.com
Subject: Re: [PATCH v2 0/3] devlink region trigger support
Date: Fri, 10 Jan 2020 10:57:29 -0800	[thread overview]
Message-ID: <e1099b1a-f1a0-4db7-9fbd-f5610e03c8b0@intel.com> (raw)
In-Reply-To: <20200110104719.2035572d@cakuba.netronome.com>

On 1/10/2020 10:47 AM, Jakub Kicinski wrote:
> On Fri, 10 Jan 2020 09:54:20 -0800, Jacob Keller wrote:
>> Mostly I wanted to make sure the direction was looking good earlier than
>> the time frame for completing that work.
> 
> As Jiri said, quite hard to tell without seeing the real user.
> 

Fair.

> I presume you take some lock to ensure the contents of the snapshot are
> atomic?  Otherwise I wonder if you wouldn't be better served by just
> allowing region read to operate directly on the data rather then going
> through the snapshot create -> read -> snapshot remove cycle. Not sure
> Jiri would agree, it require more code.
> 

Right. I saw the original devlink region commit messages indicated
possible plans to support writing to regions. There is also the question
of handling data that might want to be read sparsely, rather than
reading an entire snapshot at once. Hmm.

> For the patches themselves we may want to move the callbacks into some
> ops structure in the region.  And I don't think you need to make the
> trigger command NO_LOCK.
> 

So the reason it was made NO_LOCK right now is because the trigger ends
up calling devlink_region_snapshot_id_get and
devlink_region_snapshot_create which both take the devlink lock.

I suppose this could be simplified by having the snapshot callback take
similar parameters as the devlink_region_snapshot_create, and assume the
devlink core code does such things as generating an id and adding the
snapshot to the list all while holding the lock...

I will sort out these questions into what I think makes sense for the
use case I envision, and will submit the core devlink patches at the
same time as the driver changes.

Thanks,
Jake

      reply	other threads:[~2020-01-10 18:57 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-09 19:33 [PATCH v2 0/3] devlink region trigger support Jacob Keller
2020-01-09 19:33 ` [PATCH v2 1/3] devlink: add callback to trigger region snapshots Jacob Keller
2020-01-09 19:33 ` [PATCH v2 1/1] devlink: add support for DEVLINK_CMD_REGION_TRIGGER Jacob Keller
2020-01-09 19:33 ` [PATCH v2 2/3] devlink: introduce command to trigger region snapshot Jacob Keller
2020-01-09 19:33 ` [PATCH v2 3/3] netdevsim: support triggering snapshot through devlink Jacob Keller
2020-01-09 20:13 ` [PATCH v2 0/3] devlink region trigger support Jacob Keller
2020-01-10  4:10 ` Yunsheng Lin
2020-01-10 17:52   ` Jacob Keller
2020-01-11  1:51     ` Yunsheng Lin
2020-01-12 20:45       ` Jakub Kicinski
2020-01-12 21:18         ` Alex Vesker
2020-01-13  1:39           ` Yunsheng Lin
2020-01-13 11:34             ` Jakub Kicinski
2020-01-13 18:16               ` Jacob Keller
2020-01-13 18:33                 ` Jiri Pirko
2020-01-13 16:58       ` Jiri Pirko
2020-01-13 18:22         ` Jacob Keller
2020-01-13 18:33           ` Jiri Pirko
2020-01-14  8:33           ` Yunsheng Lin
2020-01-14 20:04             ` Jacob Keller
2020-01-15  8:36               ` Yunsheng Lin
2020-01-10  9:40 ` Jiri Pirko
2020-01-10 17:54   ` Jacob Keller
2020-01-10 18:47     ` Jakub Kicinski
2020-01-10 18:57       ` Jacob Keller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e1099b1a-f1a0-4db7-9fbd-f5610e03c8b0@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=valex@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).