[lkml]   [2000]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: sticky bit on files?
In <> Sandy Harris ( wrote:
> Marc Lehmann wrote:

>> Linux does not have swap space (it does paging, which technically is not
>> the same as swapping processes out), so the concept of the sticky bit
>> makes no sense.

> Sure it makes sense.

Of course not :-)

> A program loads, runs and terminates. The OS of course recovers the
> process' data space. If the bit is unset, it recovers the code space
> as well.

What for ? Code is space was just mmap'ed. So when program is stopped it'll
be just unmmap'ed and that's all. If there are enough memory it will not be
removed from memory: just pages will be marked as "safe to trow out when you
need memory" so if you'll start the same program quickly nothing will be
loaded from disk again. The only situation where you can see the difference is
when you have fast swap space but program is loaded from slow NFS server.
Rare situation in currect world (yet not impossible but since you need
quite deep rework of pagin subsystem for this rare case it does not worth it).

> If the bit is set, it should be keeping the program code in memory
> (possibly paging it out, but that is irrelevant) unless/until it
> has some other urgent need for that memory.

This is default behaviour - see above.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:57    [W:0.037 / U:17.540 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site