History log of /src/sys/compat/linuxkpi/common/include/linux/swap.h (Results 1 – 25 of 27)
Revision Date Author Comments
# b5f7a0b0 17-Aug-2025 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

linuxkpi: Replicate Linux #includes between headers

The DRM drivers (and probably other parts of the Linux kernel) had a
significant cleanup w.r.t. which source file includes what in Linux
6.10. Non

linuxkpi: Replicate Linux #includes between headers

The DRM drivers (and probably other parts of the Linux kernel) had a
significant cleanup w.r.t. which source file includes what in Linux
6.10. Nonetheless, the DRM drivers still depend on implicit namespace
pollution because some source files do not include all the headers they
should.

This cleanup broke the build with FreeBSD because we do not replicate
the same `#include` directives everywhere.

This commit adds the same `#include` directives in several headers in
order to get the same namespace pollution.

This fixes the build of the DRM drivers from Linux 6.10. An example is
`drm_dp_tunnel.c` which needed `str_yes_no()` defined by
<linux/string_helpers.h> (technically <linux/string_choices.h> in
Linux). It gets it through:

<linux/i2c.h> -> <linux/regulator/consumer.h> -> <linux/suspend.h> ->
<linux/swap.h> -> <linux/memcontrol.h> -> <linux/cgroup.h> ->
<linux/seq_file.h> -> <linux/string_helpers.h>

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54496

show more ...


# e3b16f53 13-Apr-2025 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

linuxkpi: Add `folio` and `folio_batch` APIs

They are used by the i915 DRM driver in Linux 6.6 (although this change
was only backported with Linux 6.7 DRM drivers).

`struct folio` simply wraps `st

linuxkpi: Add `folio` and `folio_batch` APIs

They are used by the i915 DRM driver in Linux 6.6 (although this change
was only backported with Linux 6.7 DRM drivers).

`struct folio` simply wraps `struct page` for now.

`struct folio_batch` is the same as `struct pagevec` but it works with
`struct folio` instead of `struct page` directly.

Reviewed by: bz, kib, markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48743

show more ...


# 95ee2897 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# 6d3d5653 09-Aug-2022 Emmanuel Vadot <manu@FreeBSD.org>

linuxkpi: swap.h: Fix include

Add needed includes so we can use it.

Reviewed by: bz
Fixes: c3f4f28c63da ("linuxkpi: Add some basic swap functions")
Sponsored by: Beckhoff Automation GmbH & Co. KG
D

linuxkpi: swap.h: Fix include

Add needed includes so we can use it.

Reviewed by: bz
Fixes: c3f4f28c63da ("linuxkpi: Add some basic swap functions")
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36109

show more ...


# 307f78f3 19-Dec-2021 Vladimir Kondratyev <wulf@FreeBSD.org>

LinuxKPI: Constantly use _LINUXKPI_ prefix in include guards

MFC after: 1 week
Reviewed by: bz, emaste, hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33562


# 3d5db455 24-Nov-2018 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r340427 through r340868.


# f82dd310 21-Nov-2018 Ben Widawsky <bwidawsk@FreeBSD.org>

linuxkpi: Use pageproc instead of vmproc

According to markj@:
pageproc contains the page daemon and laundry threads, which are
responsible for managing the LRU page queues and writing back dirty
pag

linuxkpi: Use pageproc instead of vmproc

According to markj@:
pageproc contains the page daemon and laundry threads, which are
responsible for managing the LRU page queues and writing back dirty
pages. vmproc's main task is to swap out kernel stacks when the system
is under memory pressure, and swap them back in when necessary. It's a
somewhat legacy component of the system and isn't required. You can
build a kernel without it by specifying "options NO_SWAPPING" (which is
a somewhat misleading name), in which vm_swapout_dummy.c is compiled
instead of vm_swapout.c.

Based on this, we want pageproc to emulate kswapd, not vmproc.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D18061

show more ...


# 5a461078 20-Nov-2018 Ben Widawsky <bwidawsk@FreeBSD.org>

linuxkpi: Remove duplicated text

Somehow this got botched while moving from git -> svn


# c3f4f28c 20-Nov-2018 Ben Widawsky <bwidawsk@FreeBSD.org>

linuxkpi: Add some basic swap functions

These are used by kms-drm to determine various heuristics relate
memory conditions.

The number of free swap pages is just a variable, and it can be
much chea

linuxkpi: Add some basic swap functions

These are used by kms-drm to determine various heuristics relate
memory conditions.

The number of free swap pages is just a variable, and it can be
much cheaper by either adding a new getter, or simply extern'ing
swap_total. However, this patch opts to use the more expensive,
existing interface - since this isn't an operation in a high per
path.

This allows us to remove some more gpl linuxkpi and do the follo
kms-drm:
git rm linuxkpi/gplv2/include/linux/swap.h

Reviewed by: mmacy, Johannes Lundberg <johalun0@gmail.com>
Approved by: emaste (mentor)
Differential Revision: https://reviews.freebsd.org/D18052

show more ...


# b5f7a0b0 17-Aug-2025 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

linuxkpi: Replicate Linux #includes between headers

The DRM drivers (and probably other parts of the Linux kernel) had a
significant cleanup w.r.t. which source file includes what in Linux
6.10. Non

linuxkpi: Replicate Linux #includes between headers

The DRM drivers (and probably other parts of the Linux kernel) had a
significant cleanup w.r.t. which source file includes what in Linux
6.10. Nonetheless, the DRM drivers still depend on implicit namespace
pollution because some source files do not include all the headers they
should.

This cleanup broke the build with FreeBSD because we do not replicate
the same `#include` directives everywhere.

This commit adds the same `#include` directives in several headers in
order to get the same namespace pollution.

This fixes the build of the DRM drivers from Linux 6.10. An example is
`drm_dp_tunnel.c` which needed `str_yes_no()` defined by
<linux/string_helpers.h> (technically <linux/string_choices.h> in
Linux). It gets it through:

<linux/i2c.h> -> <linux/regulator/consumer.h> -> <linux/suspend.h> ->
<linux/swap.h> -> <linux/memcontrol.h> -> <linux/cgroup.h> ->
<linux/seq_file.h> -> <linux/string_helpers.h>

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54496

show more ...


# e3b16f53 13-Apr-2025 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

linuxkpi: Add `folio` and `folio_batch` APIs

They are used by the i915 DRM driver in Linux 6.6 (although this change
was only backported with Linux 6.7 DRM drivers).

`struct folio` simply wraps `st

linuxkpi: Add `folio` and `folio_batch` APIs

They are used by the i915 DRM driver in Linux 6.6 (although this change
was only backported with Linux 6.7 DRM drivers).

`struct folio` simply wraps `struct page` for now.

`struct folio_batch` is the same as `struct pagevec` but it works with
`struct folio` instead of `struct page` directly.

Reviewed by: bz, kib, markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48743

show more ...


# 95ee2897 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# 6d3d5653 09-Aug-2022 Emmanuel Vadot <manu@FreeBSD.org>

linuxkpi: swap.h: Fix include

Add needed includes so we can use it.

Reviewed by: bz
Fixes: c3f4f28c63da ("linuxkpi: Add some basic swap functions")
Sponsored by: Beckhoff Automation GmbH & Co. KG
D

linuxkpi: swap.h: Fix include

Add needed includes so we can use it.

Reviewed by: bz
Fixes: c3f4f28c63da ("linuxkpi: Add some basic swap functions")
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36109

show more ...


# 307f78f3 19-Dec-2021 Vladimir Kondratyev <wulf@FreeBSD.org>

LinuxKPI: Constantly use _LINUXKPI_ prefix in include guards

MFC after: 1 week
Reviewed by: bz, emaste, hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33562


# 3d5db455 24-Nov-2018 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r340427 through r340868.


# f82dd310 21-Nov-2018 Ben Widawsky <bwidawsk@FreeBSD.org>

linuxkpi: Use pageproc instead of vmproc

According to markj@:
pageproc contains the page daemon and laundry threads, which are
responsible for managing the LRU page queues and writing back dirty
pag

linuxkpi: Use pageproc instead of vmproc

According to markj@:
pageproc contains the page daemon and laundry threads, which are
responsible for managing the LRU page queues and writing back dirty
pages. vmproc's main task is to swap out kernel stacks when the system
is under memory pressure, and swap them back in when necessary. It's a
somewhat legacy component of the system and isn't required. You can
build a kernel without it by specifying "options NO_SWAPPING" (which is
a somewhat misleading name), in which vm_swapout_dummy.c is compiled
instead of vm_swapout.c.

Based on this, we want pageproc to emulate kswapd, not vmproc.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D18061

show more ...


# 5a461078 20-Nov-2018 Ben Widawsky <bwidawsk@FreeBSD.org>

linuxkpi: Remove duplicated text

Somehow this got botched while moving from git -> svn


# c3f4f28c 20-Nov-2018 Ben Widawsky <bwidawsk@FreeBSD.org>

linuxkpi: Add some basic swap functions

These are used by kms-drm to determine various heuristics relate
memory conditions.

The number of free swap pages is just a variable, and it can be
much chea

linuxkpi: Add some basic swap functions

These are used by kms-drm to determine various heuristics relate
memory conditions.

The number of free swap pages is just a variable, and it can be
much cheaper by either adding a new getter, or simply extern'ing
swap_total. However, this patch opts to use the more expensive,
existing interface - since this isn't an operation in a high per
path.

This allows us to remove some more gpl linuxkpi and do the follo
kms-drm:
git rm linuxkpi/gplv2/include/linux/swap.h

Reviewed by: mmacy, Johannes Lundberg <johalun0@gmail.com>
Approved by: emaste (mentor)
Differential Revision: https://reviews.freebsd.org/D18052

show more ...


# b5f7a0b0 17-Aug-2025 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

linuxkpi: Replicate Linux #includes between headers

The DRM drivers (and probably other parts of the Linux kernel) had a
significant cleanup w.r.t. which source file includes what in Linux
6.10. Non

linuxkpi: Replicate Linux #includes between headers

The DRM drivers (and probably other parts of the Linux kernel) had a
significant cleanup w.r.t. which source file includes what in Linux
6.10. Nonetheless, the DRM drivers still depend on implicit namespace
pollution because some source files do not include all the headers they
should.

This cleanup broke the build with FreeBSD because we do not replicate
the same `#include` directives everywhere.

This commit adds the same `#include` directives in several headers in
order to get the same namespace pollution.

This fixes the build of the DRM drivers from Linux 6.10. An example is
`drm_dp_tunnel.c` which needed `str_yes_no()` defined by
<linux/string_helpers.h> (technically <linux/string_choices.h> in
Linux). It gets it through:

<linux/i2c.h> -> <linux/regulator/consumer.h> -> <linux/suspend.h> ->
<linux/swap.h> -> <linux/memcontrol.h> -> <linux/cgroup.h> ->
<linux/seq_file.h> -> <linux/string_helpers.h>

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54496

show more ...


# e3b16f53 13-Apr-2025 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

linuxkpi: Add `folio` and `folio_batch` APIs

They are used by the i915 DRM driver in Linux 6.6 (although this change
was only backported with Linux 6.7 DRM drivers).

`struct folio` simply wraps `st

linuxkpi: Add `folio` and `folio_batch` APIs

They are used by the i915 DRM driver in Linux 6.6 (although this change
was only backported with Linux 6.7 DRM drivers).

`struct folio` simply wraps `struct page` for now.

`struct folio_batch` is the same as `struct pagevec` but it works with
`struct folio` instead of `struct page` directly.

Reviewed by: bz, kib, markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48743

show more ...


# 95ee2897 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# 6d3d5653 09-Aug-2022 Emmanuel Vadot <manu@FreeBSD.org>

linuxkpi: swap.h: Fix include

Add needed includes so we can use it.

Reviewed by: bz
Fixes: c3f4f28c63da ("linuxkpi: Add some basic swap functions")
Sponsored by: Beckhoff Automation GmbH & Co. KG
D

linuxkpi: swap.h: Fix include

Add needed includes so we can use it.

Reviewed by: bz
Fixes: c3f4f28c63da ("linuxkpi: Add some basic swap functions")
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36109

show more ...


# 307f78f3 19-Dec-2021 Vladimir Kondratyev <wulf@FreeBSD.org>

LinuxKPI: Constantly use _LINUXKPI_ prefix in include guards

MFC after: 1 week
Reviewed by: bz, emaste, hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33562


# 3d5db455 24-Nov-2018 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r340427 through r340868.


# f82dd310 21-Nov-2018 Ben Widawsky <bwidawsk@FreeBSD.org>

linuxkpi: Use pageproc instead of vmproc

According to markj@:
pageproc contains the page daemon and laundry threads, which are
responsible for managing the LRU page queues and writing back dirty
pag

linuxkpi: Use pageproc instead of vmproc

According to markj@:
pageproc contains the page daemon and laundry threads, which are
responsible for managing the LRU page queues and writing back dirty
pages. vmproc's main task is to swap out kernel stacks when the system
is under memory pressure, and swap them back in when necessary. It's a
somewhat legacy component of the system and isn't required. You can
build a kernel without it by specifying "options NO_SWAPPING" (which is
a somewhat misleading name), in which vm_swapout_dummy.c is compiled
instead of vm_swapout.c.

Based on this, we want pageproc to emulate kswapd, not vmproc.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D18061

show more ...


12