Re: submit_bio() flush to disk immediately

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 6, 2013 at 4:20 PM, Prashant Shah <pshah.mumbai@xxxxxxxxx> wrote:
> Hi,
>
> On Tue, Aug 6, 2013 at 4:14 PM, Rajat Sharma <fs.rajat@xxxxxxxxx> wrote:
>> sync does not purge page-cache. I think you need to place some
>> filesystem hooks to purge-cache and make sure nobody else reads the
>> file while you update the block, because it will again populate
>> filesystem page-cache. Purging cache might be tricky.
>
> This does the trick on the user side but for once only. I want to do
> something similar just after the bio write within the module itself.
>
> echo 1 > /proc/sys/vm/drop_caches

so has penalty on all files and hence applications. Are you okay with
it? You need it just for one file. purge cache of just one file from
your module. Also there could be open file mappings, you might have to
wait for them to close first.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux