From mboxrd@z Thu Jan 1 00:00:00 1970 From: Valdis.Kletnieks@vt.edu (Valdis.Kletnieks at vt.edu) Date: Tue, 24 Nov 2015 11:17:26 -0500 Subject: dumping large buffers to file In-Reply-To: References: Message-ID: <39502.1448381846@turing-police.cc.vt.edu> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Tue, 24 Nov 2015 06:30:22 +0000, Ramon Fried said: > I'm currently debugging a ISP DMA issue in a kernel module. > For debugging, I would like to dump buffers to a file on run time. > The buffers are quite big, 1MB at least. The *other* question is how *often* you plan to do this. Doing it once a second is one thing, doing it once a millisecond is another. > I can think of numerous ways of transferring the buffer to user space and > saving it by a dedicated user process (Netlink, sysfs, char device, etc.) sysfs is probably a bad choice due to its 'one attribute per file' rule, debugfs would be a better approach. netlink is probably an option, and it's hard to argue with the simplicity of a char device with a plain old 'tail -f /dev/my-debug-file > /tmp/debug.out' or similar... -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 848 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20151124/eb0537a0/attachment.bin