Linux PCI Non-Transparent Bridge framework and drivers
 help / color / mirror / Atom feed
From: Logan Gunthorpe <lsgunthorpe@gmail.com>
To: D Meyer <dmeyer@gigaio.com>, Serge Semin <fancer.lancer@gmail.com>
Cc: linux-ntb <linux-ntb@googlegroups.com>
Subject: Re: Is the Scratchpad Implementation Using a LUT Standard?
Date: Wed, 11 Oct 2017 12:44:58 -0600	[thread overview]
Message-ID: <4e0e466e-9cb8-4fbb-db84-eb5b8dd012c3@gmail.com> (raw)
In-Reply-To: <CA+GK6enDdDJvqJZ=+PE=HMGuuenKqbS5LWKxFbGDHXzY6TdRSw@mail.gmail.com>

On 11/10/17 12:23 PM, D Meyer wrote:
> Regarding Switchtec, the 96xG3 part has 512 LUTs per Stack and a stack
> can have up to eight NTBs. So for that chip, if I'm starting to grasp
> this stuff, a machine with 48 NTBs would mean that on a single Stack,
> 8 (hosts) x 47 (peers) = 376 LUTs would be used up for each of the 8
> to have a shared_mw in its own LUT.
Yes, there are a bunch of annoying restrictions like that, but your 
example looks correct.
There are lots of LUTs to play around with. The bigger restriction is 
the direct windows, of
which you only have 2 per port. Creating a network in ntb_transport (et 
al) to communicate across
48 partitions is going to be a very hard problem to solve.
> Also, the current hard-coded LUT size is 64 KiB, but that can't remain
> that way to have flexibility. If the LUTs were, say 16 MiB, then the
> shred_mw LUTs use up a massive part of the BAR space.
Yes, all LUTs must be the same size. Plus the LUT space comes before the 
direct
window space in the BAR. So the alignment (and therefore maximum size) 
of the direct window space
depends on the size and the number of LUTs. I believe I chose 32 64k 
luts so that the
direct window aligns to 2MB. I originally had the size set to 4k, but 
this limited the alignment
of the direct window.

So the tradeoffs are: if you increase it you waste memory for LUTs that 
don't need the extra space,
and if you decrease it you limit the size of the direct window.
> Oh... A quick side question: For swithtec, I see that the number of
> available LUTs for a BAR is read out of the chip and then rounded down
> to a power of two... I'm curious why it's rounded down?
This has to do with the alignment I mentioned above. If the number of 
LUTs is not a power of two,
the direct window won't be nicely aligned and you get some annoying 
restrictions on it's size.

Logan

  reply	other threads:[~2017-10-11 18:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-10 12:57 Is the Scratchpad Implementation Using a LUT Standard? Doug Meyer
2017-10-10 14:17 ` Allen Hubbe
2017-10-10 15:52   ` Doug Meyer
2017-10-11 16:19     ` lsgunthorpe
2017-10-11 17:41       ` Serge Semin
2017-10-11 18:03         ` Logan Gunthorpe
2017-10-12 18:31           ` D Meyer
2017-10-12 18:38             ` Logan Gunthorpe
2017-10-11 18:23         ` D Meyer
2017-10-11 18:44           ` Logan Gunthorpe [this message]
2017-10-12 18:05             ` D Meyer
2017-10-12 18:33               ` Logan Gunthorpe

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=4e0e466e-9cb8-4fbb-db84-eb5b8dd012c3@gmail.com \
    --to=lsgunthorpe@gmail.com \
    --cc=dmeyer@gigaio.com \
    --cc=fancer.lancer@gmail.com \
    --cc=linux-ntb@googlegroups.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