Skip to contentSkip to conversation

HUGETLB commit handling.

DISCUSSION Andi Kleen 2 participants 3 messages Apr 8, 2004 1 message not in the archive

lore
Share & tools
lore

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

Andi Kleen

author
#1 lore raw
Quoted 2 lines · Andy Whitcroft

We have been looking at the HUGETLB page commit issue (offlist) and are close a final merged patch. However, our testing seems to have thrown up

This includes lazy allocation for i386 and IA64, right?

If yes, I'm waiting for your final patch then to remerge the NUMA policy code into it (currently NUMA API contains a dumb version of lazy allocation for i386 without any prereservation)

Quoted 3 lines

I would contend this is the right thing to do, as it makes the semantics of hugepages match that of the existing small pages. We are looking for a consensus as this might be construed as a semantic change.

I think it's more clean to do it at shmget() time too, so it's probably the right thing to do.

-Andi

#2 lore raw

Andi,

Yes, that is the plan we are heading for. However, to make things simpler and follow the "subnit a patch that does one thing" rule, we will likely do two patches, one to add hugetlb commit handling, and a second one to add lazy allocation for i386 and IA64.

The other problem we are wrestling with is how to do the ia386 and ia64 lazy allocation code without breaking the architectures that haven't yet switched to lazy allocation. There will probbaly be some

#define ARCH_USES_HUGETLB_PREFAULT

nonsense added to deal with the latter, if needed.

Then, further down the road, we'd like to get the common code across architectures moved up from arch/mm to mm.

Quoted 25 lines · Andi Kleen
Quoted 2 lines · Andy Whitcroft

We have been looking at the HUGETLB page commit issue (offlist) and are close a final merged patch. However, our testing seems to have thrown up

This includes lazy allocation for i386 and IA64, right?

If yes, I'm waiting for your final patch then to remerge the NUMA policy code into it (currently NUMA API contains a dumb version of lazy allocation for i386 without any prereservation)

Quoted 3 lines

I would contend this is the right thing to do, as it makes the semantics of hugepages match that of the existing small pages. We are looking for a consensus as this might be construed as a semantic change.

I think it's more clean to do it at shmget() time too, so it's probably the right thing to do.

-Andi

Signature · 9 lines
Best Regards,
Ray
-----------------------------------------------
                  Ray Bryant
512-453-9679 (work)         512-507-7807 (cell)
[email protected]             [email protected]
The box said: "Requires Windows 98 or better",
           so I installed Linux.
-----------------------------------------------
author
#3 lore raw
Quoted 7 lines

The other problem we are wrestling with is how to do the ia386 and ia64 lazy allocation code without breaking the architectures that haven't yet switched to lazy allocation. There will probbaly be some

#define ARCH_USES_HUGETLB_PREFAULT

nonsense added to deal with the latter, if needed.

In my patch I just used weak functions: use a dummy weak function in the high level code and overwrite from the architecture specific code as needed. This avoids all the ifdefs.

-Andi