[issue32941] mmap should expose madvise()

2019-05-27 Thread miss-islington


miss-islington  added the comment:


New changeset 695b1dd8cbf3a48fdb30ab96918a49b20b7ec3e7 by Miss Islington (bot) 
(Antoine Pitrou) in branch 'master':
bpo-32941:  Fix test_madvise failure when page size >= 8kiB (GH-13596)
https://github.com/python/cpython/commit/695b1dd8cbf3a48fdb30ab96918a49b20b7ec3e7


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32941] mmap should expose madvise()

2019-05-27 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
pull_requests: +13503
pull_request: https://github.com/python/cpython/pull/13596

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32941] mmap should expose madvise()

2019-05-27 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Josh, sorry, I hadn't seen your message.

Those are low-levels operations, so I don't know if it makes sense to implement 
madvise() in terms of PrefetchVirtualMemory(), or expose a separate wrapper to 
PrefetchVirtualMemory().

One complication is that we currently don't expose public wrappers over Windows 
API functions (there's a private _winapi module).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32941] mmap should expose madvise()

2019-05-27 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32941] mmap should expose madvise()

2019-05-27 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset 02db696732c031d9a0265dc9bbf4f5b1fad042b3 by Antoine Pitrou 
(Zackery Spytz) in branch 'master':
bpo-32941: Add madvise() for mmap objects (GH-6172)
https://github.com/python/cpython/commit/02db696732c031d9a0265dc9bbf4f5b1fad042b3


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32941] mmap should expose madvise()

2019-04-02 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

It might be nice to expose a more limited API to prefetch memory in bulk while 
we're at it. Windows 8 and higher offers PrefetchVirtualMemory ( 
https://docs.microsoft.com/en-us/windows/desktop/api/memoryapi/nf-memoryapi-prefetchvirtualmemory
 ) which fills roughly the same niche as madvise/posix_madvise with the 
WILLNEED hint.

I kept meaning to file an issue to suggest this, but kept getting hung up on 
how to make it as portable as possible and as powerful as possible, and where 
to implement it.

It could go on mmap, but it's also useful for just about any contiguous 
buffer-supporting object, so it almost seems like adding an os.madvise (and/or 
os.prefetch) would make more sense than specifically tying it to the mmap 
module.

--
nosy: +josh.r

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32941] mmap should expose madvise()

2019-04-02 Thread Giampaolo Rodola'


Change by Giampaolo Rodola' :


--
nosy: +giampaolo.rodola

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32941] mmap should expose madvise()

2018-03-20 Thread Zackery Spytz

Change by Zackery Spytz :


--
keywords: +patch
pull_requests: +5927
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32941] mmap should expose madvise()

2018-02-24 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

For information:
- macOS manpage for madvise():
http://www.manpages.info/macosx/madvise.2.html
- FreeBSD manpage for madvise():
https://www.freebsd.org/cgi/man.cgi?query=madvise=2

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32941] mmap should expose madvise()

2018-02-24 Thread Antoine Pitrou

New submission from Antoine Pitrou :

On POSIX, mmap objects could expose a method wrapping the madvise() library 
call.  I suggest the following API

  mmap_object.madvise(option[, start[, length]])

If omitted, *start* and *length* would span the whole memory area described by 
the mmap object.  *option* must be a recognized OS option for the madvise() 
library call.

The mmap module would expose the various MADV_* options available on the 
current platform.

Open question: should we expose madvise() or posix_madvise()? (these are two 
different calls, at least on Linux)  posix_madvise() is arguably more portable, 
but madvise() is much more powerful, so I'd lean towards madvise().

--
components: Library (Lib)
messages: 312758
nosy: larry, ned.deily, neologix, pitrou, ronaldoussoren
priority: normal
severity: normal
status: open
title: mmap should expose madvise()
type: enhancement
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com