Page MenuHomeFreeBSD

LinuxKPI: Add work-in-pgroess PAGE_IS_LKPI_PAGE
Needs ReviewPublic

Authored by bz on Wed, Oct 29, 4:08 PM.
Tags
None
Referenced Files
F134186003: D53440.id.diff
Fri, Oct 31, 11:47 AM
F134186001: D53440.id165331.diff
Fri, Oct 31, 11:47 AM
F134160039: D53440.diff
Fri, Oct 31, 6:17 AM
F134094750: D53440.diff
Thu, Oct 30, 5:36 PM
F134078567: D53440.id165331.diff
Thu, Oct 30, 2:22 PM
F134078566: D53440.id.diff
Thu, Oct 30, 2:22 PM
F134075714: D53440.diff
Thu, Oct 30, 2:03 PM
Unknown Object (File)
Thu, Oct 30, 4:17 AM
Subscribers

Details

Reviewers
olce
emaste
jrm
Summary

PAGE_IS_LKPI_PAGE is not yet defined and thus a Linux "page" is still
a native FreeBSD vm_page.

With this defined 'struct page' becomes a collection-struct for Linux
code which handles its members itself. We keep the native FreeBSD page
as first argument.

Further work is needed to finish the implementation.

The pre-processor check allows us to test the new implementation (once
done; including drm-kmod which also worked around this problem in a
place before) before finally flipping the default.

In addition to drm-kmod also mt76 (page-pools) will benefit from this.

Test Plan

I litterally rebased this from sitting in the car on the road
and resolved two conflicts; this may or may not be the latest
revision of the work but at least is updated. I'll go and have
a look from inside or next week.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 68228
Build 65111: arc lint + arc unit

Event Timeline

bz requested review of this revision.Wed, Oct 29, 4:08 PM

There's a few XXX cases in there still etc. mm.h and highmem.h got conflict resolution from the street. If I got it right a kernel w/o drm-kmod at least would compile which was all the bits I needed for the moment; will need this + page_ppols working for mt76 and drm-kmod still compiling and working despite having vm_age_t embedded somewhere which probably should not be native code but LinuxKPI code which then can handle any of that.

sys/compat/linuxkpi/common/src/linux_page.c
633

This is the logic (with or without optimization) that needs to work for all three cases.

688

This is/was debugging for me to see how big vm_page_array_size is.

sys/compat/linuxkpi/common/include/linux/page.h
51

Here's the one line that needs changing to compile this in or out.