On Wed, Apr 29, 2015 at 11:10 PM, Richard Mills <[email protected]> wrote:
> On Wed, Apr 29, 2015 at 1:28 PM, Barry Smith <[email protected]> wrote: > >> >> Forget about the issue of "changing" PetscMallocN() or adding a new >> interface instead, that is a minor syntax and annoyance issue: >> >> The question is "is it worth exploring adding a context for certain >> memory allocations that would allow us to "do" various things to the memory >> and "indicate" properties of the memory"? I think, though I agree with Jed >> that it could be fraught with difficulties, that is is worthwhile playing >> around with this. >> >> Barry >> >> > I vote "yes". One might want to, say > > * Give hints via something like madvise() on how/when the memory might be > accessed. > * Specify a preferred "kind" of memory (and behavior if the preferred kind > is not available, or perhaps even specify a priority on how hard to try to > get the preferred memory kind) > * Specify something like a preference to interleave allocation blocks > between different kinds of memory > Let me add to the list of things we might want to do: * Specify that "huge pages" be used. --Richard > I'm sure we can come up with plenty of other possibilities, some of which > might actually be useful, many of which will be useful only for very > contrived cases, and some that are not useful today but may become useful > as memory systems evolve. > > --Richard >
