>> The kernel already have cache pruning algorithm. O_STREAMING logic>> should not clear caches if there is no need to do that. We could>> The entire point of O_STREAMING is to let user space specify> policy. If user space user space knows with 100% certainty that> the data being read/written from a particular file descriptor is> use-once-and-discard data, then it makes sense to honor that> hint. In this case, user space knows best and can set policy on> a per file descriptor basis.

Yes, it makes sense, but it's useless or harmful to discard cachesif nobody else needs memory. You just lose data that may berequested in the future for no reason.