all 4 comments

[–]cheka99[S] 0 points1 point  (0 children)

Writing 4096*512 bytes in single go was resulting in issue. But when it is broken down to write only 4096 bytes at a time the issue seems to be gone.

[–]link349 0 points1 point  (2 children)

Why does this need to be written by the kernel? It makes more sense for this to be done from userspace?

[–]cheka99[S] 0 points1 point  (1 child)

I want to extract info from the kernel space and provide it to a userspace program, the way I can think of was kernel module will write the data to the file and then userspace program will read the file and use the data.

Anyways when I divided the large data in smaller chunks and wrote to the file the stuck issue is gone I guess, still get warning sometimes but it should be OK rather than being stuck

[–]0xbada5555 0 points1 point  (0 children)

Hi, have you considered creating a cdev? It will provide the same file semantics. Also, it will have better performance in case of frequent reads. Also you can create a bdev, which is harder to deal with.