ubuntu kernels < 3.7 do not include DISCARD/TRIM (FITRIM ioctl) for JFS filesystem
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
I backported the (now uptream since linux 3.7) patch to add DISCARD/TRIM to JFS filesystem from
https:/
It's quite straightforward, the only change is to exclude one line (a call to dquot_writeback
The patched 3.2 kernel (ubuntu generic 3.2.0-31.50, +JFS TRIM + LZO instead of GZIP, no other changes) is up and running on a SSD, 'fstrim' command works and also mount option 'discard'.
With the stock ubuntu 3.2 generic kernel on a SSD and JFS, I had two crashes, both inside JFS kernel code, one was catched (AppArmor?) leaving me with r/o filesystem and the other could not recover. Other than that, I experienced bad interactive performance since I installed the SSD. These have become slightly better with the patch added, but interactivity is still worse than with a rotational HD, e.g. when opening a menu. Will now investigate if running a low latency kernel fixes that.
The patch is appended, the Ubuntu KernelGitGuide says clone stock linux from kernel.ubuntu.com, but
https:/
Decide what you want and adjust the docs, please... Now the patch is against ubuntu-3.2.
With kind regards, =|o)
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: linux-image-
ProcVersionSign
Uname: Linux 3.2.28 x86_64
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 2.0.1-0ubuntu13
Architecture: amd64
AudioDevicesInUse:
USER PID ACCESS COMMAND
/dev/snd/
CRDA:
country AM:
(2402 - 2482 @ 40), (N/A, 20)
(5170 - 5250 @ 20), (N/A, 18)
(5250 - 5330 @ 20), (N/A, 18), DFS
Card0.Amixer.info:
Card hw:0 'Intel'/'HDA Intel at 0xf0640000 irq 44'
Mixer name : 'Realtek ALC262'
Components : 'HDA:10ec0262,
Controls : 29
Simple ctrls : 16
Date: Mon Oct 8 14:45:44 2012
HibernationDevice: RESUME=
InstallationMedia: Kubuntu 12.04.1 LTS "Precise Pangolin" - Release amd64 (20120820.1)
Lsusb:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
MachineType: FUJITSU SIEMENS LIFEBOOK S7110
PccardctlIdent:
Socket 0:
no product info available
PccardctlStatus:
Socket 0:
no card
ProcEnviron:
LANGUAGE=de_DE
TERM=xterm-color
PATH=(custom, user)
LANG=de_DE.UTF-8
SHELL=/bin/bash
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=
RelatedPackageV
linux-
linux-
linux-firmware 1.79.1
RfKill:
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
SourcePackage: linux
StagingDrivers: zram
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 09/10/2008
dmi.bios.vendor: FUJITSU // Phoenix Technologies Ltd.
dmi.bios.version: Version 1.35
dmi.board.name: FJNB1B5
dmi.board.vendor: FUJITSU
dmi.board.version: CP279611-02
dmi.chassis.type: 10
dmi.chassis.vendor: FUJITSU SIEMENS
dmi.chassis.
dmi.modalias: dmi:bvnFUJITSU/
dmi.product.name: LIFEBOOK S7110
dmi.sys.vendor: FUJITSU SIEMENS
Changed in linux (Ubuntu): | |
status: | New → Confirmed |
tags: | added: patch |
Update: With a low-latency kernel (3.2.28 aka ubuntu-3.2.0-31.50) responsiveness was better, but still much worse than on my old system w/ rotational HDD. Probably the problems were related to KDE/Kubuntu, because now, out of nowhere, the system is... cache_pressure = 50, no change. Ah, wait, maybe it was discard=16 (default=64) in fstab for the JFS filesystem. But I can't think of that beeing the root of evil. Anyway, up to now I can tell the patch seems to be ok. _blabla( ) that needs the same treatment. Other than that, git automagically merged it.
...FAAAAAST! _Everything_ is smooth. I don't know why. Installed 'preload', no change. Tweaked vm.swappiness=15 & vm.vfs_
For the 3.5 kernel there is another call to dquot_writeback