diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-10-25 02:42:35 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-10-25 02:42:35 +0200 |
commit | c7c7e7ee2afcb21f5523d6b66e539befe2b93b01 (patch) | |
tree | 95b780eab4082c83e163ffdaac56cc4bd0b5b1e0 /sys/src/9/port/segment.c | |
parent | b66c4a6232489ede3bfe29b813d5fee0a66dc11f (diff) |
kernel: disable freelist page caching for executables run from uncached mount
the image cache has the property of keeping a channel
for the executable binary arround which prevents the
mountpoint from going away.
this can easily be reproduced by running:
@{rfork n; ramfs; cp /bin/echo /tmp; /tmp/echo}
observe how ramfs stays arround until the image is
reclaimed. the echo binary is also cached but is
unreachable from any namespace.
we now restrict the caching to mounts that use the client
cache (-C flag) only. this should always be the case
for /bin. places where this isnt the case might observe
a performance regression.
Diffstat (limited to 'sys/src/9/port/segment.c')
-rw-r--r-- | sys/src/9/port/segment.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/src/9/port/segment.c b/sys/src/9/port/segment.c index c71eb43e6..1e263fd43 100644 --- a/sys/src/9/port/segment.c +++ b/sys/src/9/port/segment.c @@ -275,6 +275,7 @@ attachimage(int type, Chan *c, ulong base, ulong len) lock(i); incref(c); + i->nocache = (c->flag & CCACHE) == 0; c->flag &= ~CCACHE; i->c = c; i->type = c->type; |