Re: section objects and scatter/gather DMA



The section objects do not do a thing for you, but they will cause a lot of
headaches. As was suggested in GP's post, you might consider a DLL that
provides the functions needed. There are tricks for allocating memory
outside of the pools, but I would recommend the DLL approach to allocate the
large buffers, then pass them in as IOCTL's that are pended for the life of
the program. Note: if you want to be independant of the application, you
can create a small service that allocates the buffers for you and passes
them in.


--
Don Burn (MVP, Windows DDK)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr



"Charles Gardiner" <invalid@xxxxxxxxxxxxxxx> wrote in message
news:gnglnc$jft$00$1@xxxxxxxxxxxxxxxxxxxx
Don Burn schrieb:
If you are not sharing these with user space, why are you mucking with
Sections?


It's one of my design parameters that the hardware + driver must
maintain a certain history depth (somewhere < 1s of input). If I had
designed the board myself I would have put local memory on it and stored
the 'history' there. But I didn't and any way the system itself has
plenty of memory (at least 2 GB).

For the three circular buffers I mentioned, I'm looking at maybe 30
MByte worst case each but I hope I can get that down to 10 MByte each or
even below. Even these numbers seem to be too high for common buffers
for instance (map registers limitations). For look-asides from the
paged/non-paged pools I would have to request all the memory at driver
start-up and I won't be giving it free again since my circular buffers
are in constant use. The Microsoft Docs consider this pool memory a
'limited resource'. To get to a dynamic pool management (free up pool
mem if I get a lot of requests from the app. sw) I would need to
interrupt after every few packets . I don't really want to have regular
and frequent interrupts. If it's regular, the driver should take care of
it itself, at the utmost triggered by a system timer.

So, it seems to me the only choice I have left is these section objects
or essentially in-memory files. It gives me all the flexibility
(regarding size of memory buffers) I need without upsetting anything
else by being a resource hog. By 'anything else' I mean principally
network and disk activity, there's no gaming, video, VOIP or anything of
that nature going on. I am just trying to see how I get my
scatter-gather lists for the DMA.

Previous answers to my postings (thanks by the way to all responders)
suggest the 'standard' solution. Application software sends an array of
requests which are pended and filled later as the data comes in. My
issue is, the app software is not my job. To be honest, I don't think
the app. SW guys (another company) know today what they might want to do
tomorrow or next year or whenever. To give them as much flexibility as
possible, the black-box view of the HW + driver is a 'data stream
de-multiplexer with a certain history depth'. This 'certain history
depth' is my current problem.


.



Relevant Pages

  • Re: section objects and scatter/gather DMA
    ... maintain a certain history depth. ... plenty of memory. ... For the three circular buffers I mentioned, ... To get to a dynamic pool management (free up pool ...
    (microsoft.public.development.device.drivers)
  • Re: Moving pages around, (overlapped IO)
    ... > Suppose I had a collection of 4k buffers. ... > the pool, (I have a queue of pointers to them, with several threads using ... and so are not contiguous in memory. ... Since the buffers all belong to my app ...
    (borland.public.delphi.nativeapi)
  • RE: 2003 SBS stalling randomly
    ... A memory leak occurs in an application using the Volume Shadow Copy Service ... Poolmon displays data that the ... The data is grouped by pool allocation tag. ... Press P twice to display allocations from only the paged pool. ...
    (microsoft.public.windows.server.sbs)
  • RE: 2003 SBS stalling randomly
    ... and I am experiencing the same stalling of SBS 2003 ... memory and Store using upwards of 750 MB of memory. ... The server was unable to allocate from the system nonpaged pool because the ... Press P twice to display allocations from only the paged pool. ...
    (microsoft.public.windows.server.sbs)
  • [RFC PATCH 0/4] (Take 2): transcendent memory ("tmem") for Linux
    ... Normal memory is directly addressable by the kernel, ... Transcendent memory, or "tmem" for short, provides a well-defined API to ... The combination of a 32-bit pool id, a 64-bit object id, and a 32-bit ...
    (Linux-Kernel)

Loading