Skip to content

sbelectronics/pi-fdc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

"I wish my Raspberry Pi had a 360K floppy drive"

-- Something nobody said, ever. (except smbaker)

Links:

Performance tuning

See https://www.raspberrypi.org/forums/viewtopic.php?t=228727 for background.

Raspbian is not a real-time OS, and the FDC is absolutely intolerant of bytes not being serviced during read or write. If a context switch occurs, then a buffer overrun WILL occur. There are a few tricks that can mitigate this.

  • The --realtime option will set the process to SCHED_FIFO with maximum priority. This should keep other processes from interrupting it. It also writes -1 to /proc/sys/kernel/sched_rt_runtime_us, which will prevent Linux's mandatory interruption of the process for 50ms every second.

  • The --pincpu option will pin the process to a particular CPU. In and of itself this isn't useful, but it makes a difference when combined with the isolcpus kernel option.

For maximum performance:

  • Add isolcpus=3 to /boot/cmdline.txt
  • Use the --realtime and ``--pincpu 3` options.

It's still not perfect, and writing a floppy driver as a user-mode python program was a pretty silly thing to do, but you can get a failure rate down to a couple of percent, and the automatic retry will take care of that.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages