Skip to content
Advertisement

Tag: systems-programming

Should fsync() be called before or after write() call?

I understand the working of write() call wherein it writes the data only to kernel’s buffers which is later written to disk by kernel after sorting the data optimally. Calling fsync() on file descriptor makes sure that data is written to disk as soon as it’s posted in the kernel’s buffer. My question is, whether fsync() should be called before

Why does the Linux Kernel copy implementation use the AC flag?

The implementation of copy_user_enhanced_fast_string in the Linux Kernel copy routine uses stac/clac in the epilog and prolog. perf annotate shows the following code: AC is “Alignment check (or access control) flag”. What is the reason stac/clac are used in the routine? What would be the consequences if we simply remove them? Answer Normally all page access checks are disabled in

Advertisement