DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: Dmitry Kozliuk <dmitry.kozliuk@gmail.com>, dev@dpdk.org
Cc: Thomas Monjalon <thomas@monjalon.net>,
	Pallavi Kadam <pallavi.kadam@intel.com>,
	Ranjit Menon <ranjit.menon@intel.com>,
	Harini.Ramakrishnan@microsoft.com,
	Stephen Hemminger <sthemmin@microsoft.com>
Subject: Re: [dpdk-dev] Windows Support Plan
Date: Mon, 3 Feb 2020 10:25:55 +0000	[thread overview]
Message-ID: <183db34b-0700-1b3a-a2ba-4d8ff6f8d65f@intel.com> (raw)
In-Reply-To: <20200202233736.74bdf47f@Sovereign>

On 02-Feb-20 8:37 PM, Dmitry Kozliuk wrote:
> Hi everyone!
> 

Hi,

> Primary topics to discuss:
> 
> 1. Memory management (@Anatoly)
> 
>     1.1. MM changed radically since v18.08 and dpdk-next-windows does not
>          implement it properly anyway, it allocates segment lists in a PCI bus
>          driver. My implementation closely follows the Linux one using
>          VirtualAlloc2() with XXX_PLACEHOLDER flags to reserve and commit
>          memory, but does not map hugepages to files. Is there
>          a consensus on MM approach in Windows?
> 
>          Anyway, I think EAL private MM API would have to be changed,
>          because memory reservation, allocation, and mapping are
>          completely different operations. Hiding this with an mmap() shim
>          doesn't look right, because mmap()'s behavior differs even among
>          Unix platforms.
> 
>     1.2. In Windows, there is no /dev/mem to implement rte_virt2iova(),
>          so a simple kernel driver is required for mapping. Moreover,
>          Windows kernel abstracts IOMMU, so those physical addresses may
>          be unsuitable for DMA at all (see below).
> 

I haven't really been following the Windows port much so i have no idea 
of how it works for now.

The main reason DPDK memory management works the way it does is because 
of need to support multiprocess. In order to map memory in all 
processes, we need that space reserved (otherwise there's no guarantee 
that the newly mapped memory segment will be mapped in all processes, 
and it'll cause runtime failure). If it wasn't for that, we could 
allocate memory arbitrarily and as needed. Windows should either follow 
this model, or drop secondary support and go its own way - the internals 
are OS-specific anyway.

If there are changes needed to private memalloc API to support the 
above, that's completely fine - that's why all of this stuff is 
internal-only :) As long as public API stays roughly the same, we should 
be good. Bear in mind that DPDK also supports external memory, you might 
need to make some allowances for that too.

As for IOMMU - we don't support IOVA as VA addressing on FreeBSD, so if 
Windows port can only work with IOVA as PA, that's fine too. The 
question of IOVA mode really boils down to, do we control the DMA 
addresses (IOVA as VA mode), or does the system (IOVA as PA). I'm not 
familiar with how IOMMU works on Windows, but as long as it fits into 
that model and we keep the API, it should also be OK :)

-- 
Thanks,
Anatoly

  parent reply	other threads:[~2020-02-03 10:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-02 20:37 Dmitry Kozliuk
2020-02-03  9:15 ` [dpdk-dev] [EXTERNAL] " Stephen Hemminger
2020-02-03 18:18   ` Menon, Ranjit
2020-02-03 22:13     ` Dmitry Kozlyuk
2020-02-03 10:25 ` Burakov, Anatoly [this message]
2020-02-08 20:09   ` [dpdk-dev] " Dmitry Kozlyuk
2020-02-11 10:05     ` Burakov, Anatoly
2020-02-05  1:03 ` Thomas Monjalon

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=183db34b-0700-1b3a-a2ba-4d8ff6f8d65f@intel.com \
    --to=anatoly.burakov@intel.com \
    --cc=Harini.Ramakrishnan@microsoft.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=pallavi.kadam@intel.com \
    --cc=ranjit.menon@intel.com \
    --cc=sthemmin@microsoft.com \
    --cc=thomas@monjalon.net \
    /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).