Re: UIO Devices and user processes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Well I don't think I'll have to write a custom allocator. Existing allocators allow you to have placement allocation, or rather more precisely, manage sub-buffers within a static buffer. By this I mean that the sub buffer is treated as though it were an existing slab given to the process by the OS, but instead of actually servicing it with new and free, you place a table in it that acts just like the table that libc manages and coalesces during regular management with typical use. In any case, I think I don't have to do this because it's just a regular consumer producer issue, and I can use ring buffers for that.

On Wed, Oct 7, 2015 at 1:02 PM, Greg KH <greg@xxxxxxxxx> wrote:
On Tue, Oct 06, 2015 at 10:46:49AM -0400, Kenneth Adam Miller wrote:
> Let me be more precise in general to the overall original question:
>
> I want a userland process that I designate to only use a specific hard coded
> region physical of memory for it's heap. A UIO driver is the means by which
> I've gone about seeking to achieve this. 

Use LD_PRELOAD to hook into your custom library that handles the
allocation to this special portion of memory that you grabbed from the
hardware using the UIO kernel interface instead of the "normal" libc
allocator, and you will be fine.  But you will have to write a custom
allocator, there's no other way around that.

The kernel gives you the ability to do this today, no kernel changes
needed, it's all "just" userspace code you will have to do on your own.

Best of luck, that's going to be some "fun" work :)

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux