2017-11-08 00:46:29

by Aneesh Kumar K.V

[permalink] [raw]
Subject: Re: POWER: Unexpected fault when writing to brk-allocated memory


>
> If it is decided to keep these kind of heuristics, can we get just a
> small but reasonably precise description of each change to the
> interface and ways for using the new functionality, such that would be
> suitable for the man page? I couldn't fix powerpc because nothing
> matches and even Aneesh and you differ on some details (MAP_FIXED
> behaviour).


I would consider MAP_FIXED as my mistake. We never discussed this
explicitly and I kind of assumed it to behave the same way. ie, we
search in lower address space (128TB) if the hint addr is below 128TB.

IIUC we agree on the below.

1) MAP_FIXED allow the addr to be used, even if hint addr is below 128TB
but hint_addr + len is > 128TB.

2) For everything else we search in < 128TB space if hint addr is below
128TB

3) We don't switch to large address space if hint_addr + len > 128TB.
The decision to switch to large address space is primarily based on hint
addr

Is there any other rule we need to outline? Or is any of the above not
correct?

-aneesh


From 1583455700748512269@xxx Wed Nov 08 00:30:32 +0000 2017
X-GM-THRID: 1583404961130869946
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread


2017-11-07 22:53:37

by Kirill A. Shutemov

[permalink] [raw]
Subject: Re: POWER: Unexpected fault when writing to brk-allocated memory

On Tue, Nov 07, 2017 at 07:15:58PM +0530, Aneesh Kumar K.V wrote:
>
> >
> > If it is decided to keep these kind of heuristics, can we get just a
> > small but reasonably precise description of each change to the
> > interface and ways for using the new functionality, such that would be
> > suitable for the man page? I couldn't fix powerpc because nothing
> > matches and even Aneesh and you differ on some details (MAP_FIXED
> > behaviour).
>
>
> I would consider MAP_FIXED as my mistake. We never discussed this explicitly
> and I kind of assumed it to behave the same way. ie, we search in lower
> address space (128TB) if the hint addr is below 128TB.
>
> IIUC we agree on the below.
>
> 1) MAP_FIXED allow the addr to be used, even if hint addr is below 128TB but
> hint_addr + len is > 128TB.
>
> 2) For everything else we search in < 128TB space if hint addr is below
> 128TB
>
> 3) We don't switch to large address space if hint_addr + len > 128TB. The
> decision to switch to large address space is primarily based on hint addr
>
> Is there any other rule we need to outline? Or is any of the above not
> correct?

That's correct.

--
Kirill A. Shutemov

From 1583448045764887435@xxx Tue Nov 07 22:28:52 +0000 2017
X-GM-THRID: 1583404961130869946
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread