Skip to contentSkip to conversation

posix_fadvise

DISCUSSION Jamie Lokier 3 participants 6 messages Apr 14, 2000 – Apr 15, 2000 3 messages not in the archive Memory management

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 7 lines · Ulrich Drepper
Quoted 2 lines

What does POSIX_FADV_DONTNEED mean? MADV_DONTNEED has at least three incompatible meanings between different unix systems...

Their definition is:

Specifies that the applicatione xpects that it will not access the specified data in the near future.

Ok. You should be aware that the present Linux implementation of MADV_DONTNEED is "nukes dirty data". Do you have a POSIX standard that says POSIX MADV_DONTNEED should be similar to POSIX_FADV_DONTNEED?

There was some discussion on linux-mm about renaming this behaviour to MADV_WONTNEED or MADV_DISCARD to avoid ambiguity. Some other OSes implement MADV_DONTNEED by discarding data, but there are at least two other semantics around including one like POSIX_FADV_DONTNEED.

enjoy,
-- Jamie
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/

#4 lore raw
Quoted 3 lines · Jamie Lokier

Ok. You should be aware that the present Linux implementation of MADV_DONTNEED is "nukes dirty data". Do you have a POSIX standard that says POSIX MADV_DONTNEED should be similar to POSIX_FADV_DONTNEED?

Yes. But this shouldn't be a problem. Nobody says that nuking isn't OK.

Signature · 7 lines
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
#5 lore raw
Quoted 7 lines · Ulrich Drepper
Quoted 3 lines · Jamie Lokier

Ok. You should be aware that the present Linux implementation of MADV_DONTNEED is "nukes dirty data". Do you have a POSIX standard that says POSIX MADV_DONTNEED should be similar to POSIX_FADV_DONTNEED?

Yes. But this shouldn't be a problem. Nobody says that nuking isn't OK.

You gave the definition as "the application does not need the data in the near future". If it were ok to nuke the data, the definition would say "the application does not need the data".

-- Jamie
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/

#6 lore raw
Quoted 3 lines · Jamie Lokier

You gave the definition as "the application does not need the data in the near future". If it were ok to nuke the data, the definition would say "the application does not need the data".

THere is no problem because the OS will recover. I don't say it's an optimal implementation but given that the name is used differently on different OSes (at least the one without the POSIX_ prefix) people will have to adjust themselves.

Of course I would prefer if the option in the Linux kernel could do what POSIX says and simply add a new option for the current behaviour. But nobody listens to me anyway so why bother.

Signature · 7 lines
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
#7 lore raw

Hi,

Quoted 4 lines · Ulrich Drepper

Of course I would prefer if the option in the Linux kernel could do what POSIX says and simply add a new option for the current behaviour. But nobody listens to me anyway so why bother.

The current behaviour is consistent with a lot of other implementations, and I've had very specific requests from application vendors that Linux continue to behave the same way.

--Stephen
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/

#8 lore raw
Quoted 3 lines · Stephen C. Tweedie

The current behaviour is consistent with a lot of other implementations, and I've had very specific requests from application vendors that Linux continue to behave the same way.

I've never suggested to remove the old behaviour. Just implement the other one as well or at least provide an appropriate constant/macro so that I can use it.

Signature · 7 lines
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/