Compare commits
14 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
142265ec13 | ||
|
|
6a46ca5ab4 | ||
|
|
9cb77acd97 | ||
|
|
84f4421480 | ||
|
|
f5fd1413f9 | ||
|
|
aa06ded33a | ||
|
|
3246ac92e8 | ||
|
|
cab06e5ede | ||
|
|
efceafb776 | ||
|
|
d84b300dbd | ||
|
|
052183931a | ||
|
|
606846f61f | ||
|
|
b41e31f205 | ||
|
|
52b786a6b3 |
5 changed files with 37 additions and 12 deletions
|
|
@ -1 +0,0 @@
|
|||
it's a couple of bash scripts, no need for rebuilds
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
# The factor is the percentage of total system RAM to allocate to the ZRAM block device(s).
|
||||
# The factor determines the ratio 1/n of RAM to allocate to the ZRAM block device, where FACTOR = n.
|
||||
FACTOR=2
|
||||
|
||||
PRIORITY=1000
|
||||
|
|
|
|||
37
zram.spec
37
zram.spec
|
|
@ -1,8 +1,9 @@
|
|||
Name: zram
|
||||
Version: 0.3
|
||||
Release: 1%{?dist}
|
||||
Version: 0.4
|
||||
Release: 10%{?dist}
|
||||
Summary: ZRAM for swap config and services for Fedora
|
||||
License: GPLv2+
|
||||
# Automatically converted from old format: GPLv2+ - review is highly recommended.
|
||||
License: GPL-2.0-or-later
|
||||
|
||||
# No upstream as it's Fedora specific.
|
||||
Source0: COPYING
|
||||
|
|
@ -53,6 +54,36 @@ install -pm 0755 %{SOURCE4} %{buildroot}%{_sbindir}
|
|||
%{_sbindir}/zramstop
|
||||
|
||||
%changelog
|
||||
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-10
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Fri Jul 26 2024 Miroslav Suchý <msuchy@redhat.com> - 0.4-8
|
||||
- convert license to SPDX
|
||||
|
||||
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Wed Jun 26 2019 Peter Robinson <pbrobinson@fedoraproject.org> 0.4-1
|
||||
- General improvements (Chris Murphy)
|
||||
|
||||
* Sat Nov 24 2018 Peter Robinson <pbrobinson@fedoraproject.org> 0.3-1
|
||||
- Add support for swap priority
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ priority=32767
|
|||
mem_total=$(free -w |grep "^Mem" |awk '{printf("%d",$2)}')
|
||||
zram_size=$((${mem_total} / ${factor} /1024))
|
||||
|
||||
# zram in recent kernels is multitreaded so we don't need to balance across CPUs
|
||||
# ZRAM in recent kernels is multithreaded so we don't need to balance across CPUs
|
||||
modprobe -q zram num_devices=1
|
||||
|
||||
# Create ZRAM with first device, lz4 algorithm
|
||||
|
|
|
|||
7
zramstop
7
zramstop
|
|
@ -1,10 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
for i in $(grep '^/dev/zram' /proc/swaps | awk '{ print $1 }'); do
|
||||
swapoff "$i"
|
||||
swapoff "$i" && zramctl --reset "$i"
|
||||
done
|
||||
|
||||
if grep -q "^zram " /proc/modules; then
|
||||
sleep 1
|
||||
rmmod zram
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue