Package Details: linux-xanmod 5.11.3-1

Git Clone URL: https://aur.archlinux.org/linux-xanmod.git (read-only, click to copy)
Package Base: linux-xanmod
Description: The Linux kernel and modules with Xanmod patches
Upstream URL: http://www.xanmod.org/
Licenses: GPL2
Submitter: Yoshi2889
Maintainer: figue (figuepluto, jfigueras)
Last Packager: figue
Votes: 65
Popularity: 2.96
First Submitted: 2017-02-14 09:40
Last Updated: 2021-03-04 19:32

Pinned Comments

figue commented on 2018-12-14 00:50

This package have several variables to enable/disable features.

##
## The following variables can be customized at build time. Use env or export to change at your wish
##
##   Example: env _microarchitecture=99 use_numa=n use_tracers=n use_pds=n makepkg -sc
##
## Look inside 'choose-gcc-optimization.sh' to choose your microarchitecture
## Valid numbers between: 0 to 99
## Default is: 0 => generic
## Good option if your package is for one machine: 99 => native
if [ -z ${_microarchitecture+x} ]; then
  _microarchitecture=0
fi

## Disable NUMA since most users do not have multiple processors. Breaks CUDA/NvEnc.
## Archlinux and Xanmod enable it by default.
## Set variable "use_numa" to: n to disable (possibly increase performance)
##                             y to enable  (stock default)
if [ -z ${use_numa+x} ]; then
  use_numa=y
fi

## For performance you can disable FUNCTION_TRACER/GRAPH_TRACER. Limits debugging and analyzing of the kernel.
## Stock Archlinux and Xanmod have this enabled. 
## Set variable "use_tracers" to: n to disable (possibly increase performance)
##                                y to enable  (stock default)
if [ -z ${use_tracers+x} ]; then
  use_tracers=y
fi

## Enable Cachy CPU scheduler by default https://github.com/xanmod/linux/blob/5.8/Documentation/scheduler/sched-Cachy.rst
## Set variable "use_cachy" to: n to disable (stock Xanmod)
##                              y to enable
if [ -z ${use_cachy+x} ]; then
  use_cachy=n
fi

## Enable CONFIG_USER_NS_UNPRIVILEGED flag https://aur.archlinux.org/cgit/aur.git/tree/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch?h=linux-ck
## Set variable "use_ns" to: n to disable (stock Xanmod)
##                           y to enable (stock Archlinux)
if [ -z ${use_ns+x} ]; then
  use_ns=n
fi

# Compile ONLY used modules to VASTLYreduce the number of modules built
# and the build time.
#
# To keep track of which modules are needed for your specific system/hardware,
# give module_db script a try: https://aur.archlinux.org/packages/modprobed-db
# This PKGBUILD read the database kept if it exists
#
# More at this wiki page ---> https://wiki.archlinux.org/index.php/Modprobed-db
if [ -z ${_localmodcfg} ]; then
  _localmodcfg=n
fi

Personally I'm running now xanmod kernel compiled with this:

env _microarchitecture=99 use_numa=n use_tracers=n use_ns=y _localmodcfg=y makepkg -si

Also, you can now create the file myconfig in your local repo to build this package with a custom config or use ${XDG_CONFIG_HOME}/linux-xanmod/myconfig. This file can be a full kernel config or be a script with several entries to add/remove options (you have several examples in PKGBUILD by using scripts/config):

Code involved:

  for _myconfig in "${startdir}/myconfig" "${XDG_CONFIG_HOME}/linux-xanmod/myconfig" ; do
    if [ -f "${_myconfig}" ]; then
      if grep -q 'scripts/config' "${_myconfig}"; then
        # myconfig is a partial file. Executing as a script
        msg2 "Applying myconfig..."
        bash -x "${_myconfig}"
      else
        # myconfig is a full config file. Replacing default .config
        msg2 "Using user CUSTOM config..."
        cp -f "${_myconfig}" .config
      fi
      echo
    fi
  done

Latest Comments

1 2 3 4 5 6 ... Next › Last »

figue commented on 2021-03-03 07:35

@simona linux-xanmod-anbox is not maintained by me. Please, leave a comment in its web.

simona commented on 2021-03-03 00:14

linux-xanmod-anbox is more slow? someone can explain me why '-anbox' is not the standard default config for kernel?

figue commented on 2021-03-02 23:24

@xuanruiqi solved in 3de884c332a5

xuanruiqi commented on 2021-03-02 19:54

FWIW, my config is also quite small.

xuanrui@xuanrui-desktop:~ % zgrep '=y' /proc/config.gz| wc -l
1682
xuanrui@xuanrui-desktop:~ % zgrep '=m' /proc/config.gz| wc -l
303

My vmlinuz is smaller than the Arch default one as well, but still:

xuanrui@xuanrui-desktop:~ % du -sh /usr/lib/modules/*                           
805M    /usr/lib/modules/5.11.1-xanmod2-cacule-2-cacule
272M    /usr/lib/modules/5.11.2-arch1-1

Again this is all due to build/vmlinux. Could you do du -sh /usr/lib/modules/* as well?

I don't think this is a bug or problem, but I'd be interested to know why. I also opened an issue on GitHub and hope the maintainers have some insight.

figue commented on 2021-02-27 09:05

@xuanruiqi probably is an addition of some optimizations and some additional options enabled in XanMod that are not in Arch. Also XanMod bzImage is compressed with lz4 and Arch with zstd. In my case I compile XanMod with modprobed-db and the result is less than Arch:

figue on pluto /tmp ➜  ls -lh vmlinuz-linux.uncompressed vmlinuz-linux-xanmod.uncompressed
-rw-r--r-- 1 figue users 45M feb 27 09:54 vmlinuz-linux-xanmod.uncompressed
-rw-r--r-- 1 figue users 49M feb 27 09:55 vmlinuz-linux.uncompressed

Of course, my configs and modules enabled are less than Arch:

figue on pluto /tmp ✗  zgrep '=y' /proc/config.gz | wc -l
1941
figue on pluto /tmp ➜  zgrep '=m' /proc/config.gz | wc -l
242
figue on pluto /tmp ➜  grep '=y' arch.config | wc -l
2522
figue on pluto /tmp ➜  grep '=m' arch.config | wc -l 
5167

If we compare it with XanMod's default config:

figue on pluto /tmp ➜  grep '=y' xanmod.config | wc -l 
2637
figue on pluto /tmp ➜  grep '=m' xanmod.config | wc -l 
5618

Cheers

xuanruiqi commented on 2021-02-26 10:20

Xanmod kernel is very large for me as well. It's not a problem, but I'm curious why:

$ du -sh /usr/lib/modules/5.11.1-arch1-1 
272M    /usr/lib/modules/5.11.1-arch1-1

$ du -sh /usr/lib/modules/5.11.1-xanmod2-cacule-2-cacule 
805M    /usr/lib/modules/5.11.1-xanmod2-cacule-2-cacule

It seems that build/vmlinux (the uncompressed kernel image) is the one guilty. (I'm on the cacule branch but same follows for the main branch)

At first I thought it was related to using -O3 because it performs function inlining, but -O2 didn't make it any better either. I was wondering if some XanMod patch causes this.

cartesius commented on 2021-02-23 16:17

@vpont same here... ~181 modules modprobed and size ~13 M. It's OK.

9,0M vmlinuz-linux
8,9M vmlinuz-linux-lts
 13M vmlinuz-linux-xanmod-lts
9,5M vmlinuz-linux-zen

figue commented on 2021-02-08 17:52

@vpont I think it's because XanMod config includes less modules than arch's config.

vpont commented on 2021-02-08 16:59

How's it possible that, even with modprobed' compiled kernel, the final xanmod kernel is bigger than the generic one?

9,0M   /boot/vmlinuz-linux
6,2M   /boot/vmlinuz-linux-lts
13M    /boot/vmlinuz-linux-xanmod

figue commented on 2021-02-06 16:07

@sahilbest999 please follow the official wiki page to configure modprobed-db:

https://wiki.archlinux.org/index.php/Modprobed-db

Probably your database is not generated properly.