News for hackers. Stuff that matters.
Re:Linux ate my RAM (2009) by jschwartzi on Monday May 14, 2018 @08:58PM (#17070758)
Well, actually I would love to disable disk caching on my embedded Linux systems because it's a really common use case that they lose power and I would like to not have a bunch of data in memory when that happens. Right now I have to call sync before I do anything with the power or when I come back up everything I just "copied" is gone.
Re:Linux ate my RAM (2009) by mlaretallack on Tuesday May 15, 2018 @02:38AM (#17072088)
Was about to say this. The disk cache does get in the way when you want to have realtime response on embedded system. The swapd just seems to cause issues.
Re:Linux ate my RAM (2009) by fulafel on Tuesday May 15, 2018 @12:34AM (#17071672)
You can use O_SYNC. This will make the wear on your flash bigger so use with caution on cheapo flash, like SD cards.
Re:Linux ate my RAM (2009) by helianer on Tuesday May 15, 2018 @12:15AM (#17071602)
You would still want to leave on read caching.

You can still turn off write caching on your disks with hdparm.