Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
base: 1578559e65f2
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: ab31b13401f1
Choose a head ref
  • 3 commits
  • 2 files changed
  • 1 contributor

Commits on Jan 17, 2019

  1. zramSwap: allow configure compression algorithm + cleanups

    - add `zramSwap.algorithm` option, which allows to change compressor
    declaratively. zstd as default
    - add `zramSwap.swapDevices` option, which allows to define how many zram
    devices will be used as swap. Rest devices can be managed freely
    - simpler floating calculations
    - fix udev race condition
    - some documentation changes
    - replaced `/sys/block/zram*` handling with `zramctl`, because I had occasional
    "Device is busy" error (looks like zram has to be configured in predefined order)
    - added `memoryPercent` and `algorithm` as restart triggers. I think, it was
    a bug that changing `memoryPercent` in configuration wasn't applied immediately.
    - removed a bind to .swap device. While it looks natural (when swap device goes
    off, so should zram device), it wasn't implemented properly. This caused problems
    with swapon/swapoff:
    ```
    $ cat /proc/swaps
    Filename                                Type            Size    Used    Priority
    /dev/zram0                              partition       8166024 0       -2
    /var/swapfile                           file            5119996 5120    1
    
    $ sudo swapoff -a
    
    $ sudo swapon -a
    swapon: /dev/zram0: read swap header failed
    
    $ cat /proc/swaps
    Filename                                Type            Size    Used    Priority
    /var/swapfile                           file            5119996 0       1
    ```
    danbst committed Jan 17, 2019
    Copy the full SHA
    8d8a721 View commit details
    Browse the repository at this point in the history
  2. zramSwap: remove basic.target for zram devices

    This creates a dependency cycle when used with boot.tmpOnTmpfs:
    basic.target <- tmp.mount <- swap.target <- zram-init-dev0 <- basic.target
    
    This same fix is done already for tmp.mount
    
    Fixes #47474
    danbst committed Jan 17, 2019
    Copy the full SHA
    34a764c View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2019

  1. Merge pull request #52991 from danbst/zram-zstd

    zramSwap: allow configure compression algorithm + cleanups
    danbst committed Jan 23, 2019
    Copy the full SHA
    ab31b13 View commit details
    Browse the repository at this point in the history