I was going through device driver development in Linux. I've come across memory mapping of device driver in Linux.
I was trying to develop a RAM Disk block device driver (which creates virtual disk out of RAM). But I coudln't figure out how to use memory mapping here (just for trying out).
I guess block devices would 've used memory mapping.
Can someone shed some light on this ?
Also, if we map the memory in user space using remap_pfn_range, how will that work ? If the user simply writes something on the region, will it get automatically reflected inside the device or the request function that got registered for I/O will be called ?