- User Since
- Nov 13 2017, 4:43 AM (105 w, 21 h)
It looks we better drop swp_pager_meta_ctl() changes from this, D22324, and let D22409 take over the lookup implementation while dropping SWM_POP for simpler diff.
D22409 change is to optimize swap_pager_haspage() with additional searches after successful pindex lookup.
Sat, Nov 16
Fri, Nov 15
D22280 has been committed.
Mon, Nov 11
Sat, Nov 9
Correct swblk index and exclude swp_pager_swblk_free_empty() changes.
I don't think this code duplication in swap_pager_copy() is a good idea.
I updated D22256 to avoid the double lookup cost from the first revision.
I'm still testing the 2nd version though.
Created swp_pager_meta_find_least private API to find and delete in a single
operation. swap_pager_find_least calls it for look up.
Wed, Nov 6
Tue, Nov 5
Suspend for now.
Fri, Oct 25
I've been using the comparison based optimization for 2 weeks on current
following daily, buildworld/buildkernel daily and haven't seen an issue
with this approach.
Mon, Oct 21
I see. I just added zfs/zvol swap space temporary from command line within the last a couple of weeks for other reasons. I see few of too early OOM on few of machines although it is very rare and spontaneous such that it hasn't been easy to find a trigger.
Sun, Oct 20
swap_pager_full != 0 was indeed too aggressive. I'm wondering if we can feed in swap space usage such that we can delay OOM electing at low usage and push for OOM at high usage.
Oct 19 2019
Oct 17 2019
Oct 14 2019
That's another idea.
I will check the code and test if that is also an option.
Thanks for follow up, markj.
Oct 13 2019
Oct 12 2019
Use "== SWPG_LOW" comparison for almost full warning.
Drop swp_gauge > SWPG_LOW comparison for high watermark check.
Oct 3 2019
The only reason I created a patch was to proceed removal of sys/dir.h in the base system.
Given the upstream source hasn't been updated for more than a couple of decade.
It looks the code still assume 20 year old standard.
Sep 29 2019
But sysctl describes totally different:
Sep 18 2019
destLen -> destlen.
Sep 7 2019
Sep 6 2019
Sep 5 2019
Aug 27 2019
Remove uninteded debug print.
Aug 26 2019
Also print length with PRIu32.
Aug 25 2019
Include zutil.h instead of zlib.h in order to pick up OS_CODE and DEF_MEM_LEVEL.
Aug 24 2019
Aug 23 2019
We have a last item - sys/kern/subr_compressor.c includes sys/zutil.h.
I attempted and saw crc32() API conflict between gsb_crc32.h and zutil.h.
I haven't got a chance this week, though.
Aug 22 2019
Thank you for explanations.
I found and had looked at that git repo while reviewing this change.
However, I didn't have enough guts to look into each of repo history to figure out which one came from where.
That explains why all of ppp use Z_PACKET_FLUSH while really NONE uses Z_SYNC_FLUSH.
Aug 18 2019
The change looks reasonable based on PPP protocol and comparison to existing zlib code.
Aug 17 2019
I will take a closer look.
I've never used nor looked into details of this API.
Please allow me a bit extra time for review.
Aug 15 2019
Aug 9 2019
Aug 8 2019
I haven't looked into FreeBSD extension of zlib yet to see if this change is safe.
I wasn't aware of swap partition being the the first in a slice was the case. All of my swaps have been either one of whole device, whole slice or non-first partition, or NFS files. No wonder I never encountered any issues over years even with this change on my local tree.
Aug 7 2019
Aug 6 2019
I found and have one more minor comment.
Aug 5 2019
Aug 4 2019
I agree with the changes.
Aug 3 2019
Expose functions from compress.c with modified MY_ZCALLC handling.
Aug 2 2019
Enhancce MY_ZCALLOC to expose functions in compress.c.
This also allows to use default zfree.
Given we added -DZ_SOLO to zlib, pass zfree function explicitly.
Expose compressBound() function even with -DZ_SOLO.
compress2() doesn't work with -DZ_SOLO and not worth exposing as is.
Alternative is improve MY_ZCALLOC conditions along with Z_SOLO for compress2 to work as well.
Given we added -DZ_SOLO to zlib, pass zfree function explicitly.
Aug 1 2019
I tested reads and writes on gzipped ZFS between 12.0-RELEASE and 13-CURRENT with this changes.
The test result was good.
Jul 31 2019
It looks ZFS changes, dropping zlib files in zfs, are melded into this one.
I recall needing to add -DGZIP and/or -DGUNZIP option for zfs compression=gzip to properly uncompress gzipped zfs devices with older version; there was gzip header regression...
Jul 30 2019
D21099 removed gzip'ed a.out support. Rebased and adjusted.
Someone mentioned https://svnweb.freebsd.org/base?view=revision&revision=231885 was trigger in one of the mailing list. Anyway, if that's true, it's been broken for 7 years.
Jul 29 2019
The changes look okay.
Jul 28 2019
D21072, "Remove support for kernel.tramp and kernel.tramp.gz", precedes this revision. This removes obsolete use of legacy zlib version.
Jul 27 2019
Jul 15 2019
Actually, this file rename doesn't fix https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205822.
I don't think it is worth addressing this bug report here as removing the zlib in zfs also fixes this issue and we are aiming for this serious of changes.
Jul 13 2019
Disable broken gzipped aout executable support and rename zlib in ZFS to avoid filename conflicts.
Jul 11 2019
D20635 picked up the changes.
Jul 9 2019
Adjusted sys/type.h include to FreeBSD section and also moved crypto_z* function implementations to top of file.
Jul 7 2019
Drop NO_GZIP compile option changes in zlib as these aren't necessary at this stage.
I had missed zcalloc.c in sys/modules/Makefile, too.
Missed zcallc.h/c files from last update.
Drop -DMY_ZCALLOC from kmod.mk but put zcfree() back.
Jul 5 2019
Drop -DMY_ZCALLOC as no use under -DZ_SOLO.
Use -DZ_SOLO to avoid standard C header files.
ZFS requires Non-Z_SOLO ZLIB and we will revisit when we work on ZFS.
Combined opencrypto conversion to avoid dtrace probe name changes.
Jul 3 2019
I've been away and haven't been able to follow up or read updates on any of "swapoff" related changes for the last one week.
I won't be able to get back to this for another week; I will find the situations and figure out what to do later.
It is currently looking like Doug is finalizing changes based at quick look of incoming email titles. I appreciate your passion.
Jun 27 2019
Added sys/contrib/zlib/crc32.c to zlib kernel module.
Drop underscore from symbols - changed prefix from _zlib104 to zlib104.
Jun 21 2019
Removed commented code in Makefiles.
Jun 19 2019
crc32 split has been comitted and code rebased.
Xin committed this change with minor adjustments and https://svnweb.freebsd.org/base?view=revision&revision=349151 was the revision.