Re: sticky bit on files?

From: Khimenko Victor (khim@sch57.msk.ru)
Date: Wed Jul 26 2000 - 13:05:40 EST


In <397F12FB.D5857450@storm.ca> Sandy Harris (sandy@storm.ca) 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 majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jul 31 2000 - 21:00:22 EST