643cbe3210
16541 Commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
|
b3d2d42542 |
Merge keystone/android12-5.10-keystone-qcom-release.101+ (ac14ef0 ) into msm-5.10
* refs/heads/tmp-ac14ef0: BACKPORT: can: usb_8dev: usb_8dev_start_xmit(): fix double dev_kfree_skb() in error path ANDROID: GKI: Update symbols to symbol list ANDROID: oplus: Update the ABI xml and symbol list UPSTREAM: remoteproc: Fix count check in rproc_coredump_write() BACKPORT: esp: Fix possible buffer overflow in ESP transformation ANDROID: Fix the drain_all_pages default condition broken by a hook UPSTREAM: Revert "xfrm: xfrm_state_mtu should return at least 1280 for ipv6" UPSTREAM: xfrm: fix MTU regression ANDROID: signal: Add vendor hook for memory reaping FROMGIT: usb: gadget: uvc: allow for application to cleanly shutdown FROMGIT: usb: dwc3: gadget: increase tx fifo size for ss isoc endpoints UPSTREAM: usb: gadget: configfs: clear deactivation flag in configfs_composite_unbind() FROMGIT: usb: gadget: uvc: remove pause flag use FROMGIT: usb: gadget: uvc: allow changing interface name via configfs UPSTREAM: usb: gadget: uvc: Fix crash when encoding data for usb request UPSTREAM: usb: gadget: uvc: test if ep->desc is valid on ep_queue UPSTREAM: usb: gadget: uvc: only pump video data if necessary UPSTREAM: usb: gadget: uvc: only schedule stream in streaming state UPSTREAM: usb: dwc3: gadget: Give some time to schedule isoc UPSTREAM: usb: gadget: uvc: make uvc_num_requests depend on gadget speed UPSTREAM: usb: gadget: composite: Show warning if function driver's descriptors are incomplete. FROMLIST: kbuild: Add environment variables for userprogs flags ANDROID: dm-bow: Protect Ranges fetched and erased from the RB tree BACKPORT: staging: ion: Prevent incorrect reference counting behavour FROMGIT: net: fix wrong network header length UPSTREAM: mm: fix unexpected zeroed page mapping with zram swap ANDROID: vendor_hooks: Add hooks for mutex UPSTREAM: usb: dwc3: gadget: Replace list_for_each_entry_safe() if using giveback UPSTREAM: usb: dwc3: Issue core soft reset before enabling run/stop UPSTREAM: usb: dwc3: gadget: Wait for ep0 xfers to complete during dequeue ANDROID: Update QCOM symbol list for trace_map/unmap ANDROID: fix KCFLAGS override by __ANDROID_COMMON_KERNEL__ ANDROID: vendor_hooks: tune reclaim scan type for specified mem_cgroup ANDROID: vendor_hooks: Add hooks for rwsem ANDROID: Add flag to indicate compiling against ACK ANDROID: GKI: build damon reclaim FROMLIST: mm/damon/reclaim: Fix the timer always stays active BACKPORT: treewide: Add missing includes masked by cgroup -> bpf dependency UPSTREAM: mm/damon: modify damon_rand() macro to static inline function UPSTREAM: mm/damon: add 'age' of region tracepoint support UPSTREAM: mm/damon: hide kernel pointer from tracepoint event UPSTREAM: mm/damon/vaddr: hide kernel pointer from damon_va_three_regions() failure log UPSTREAM: mm/damon/vaddr: use pr_debug() for damon_va_three_regions() failure logging UPSTREAM: mm/damon/dbgfs: remove an unnecessary variable UPSTREAM: mm/damon: move the implementation of damon_insert_region to damon.h UPSTREAM: mm/damon: add access checking for hugetlb pages UPSTREAM: mm/damon/dbgfs: support all DAMOS stats UPSTREAM: mm/damon/reclaim: provide reclamation statistics UPSTREAM: mm/damon/schemes: account how many times quota limit has exceeded UPSTREAM: mm/damon/schemes: account scheme actions that successfully applied UPSTREAM: mm/damon: convert macro functions to static inline functions UPSTREAM: mm/damon: move damon_rand() definition into damon.h UPSTREAM: mm/damon/schemes: add the validity judgment of thresholds UPSTREAM: mm/damon/vaddr: remove swap_ranges() and replace it with swap() UPSTREAM: mm/damon: remove some unneeded function definitions in damon.h UPSTREAM: mm/damon/core: use abs() instead of diff_of() UPSTREAM: mm/damon: unified access_check function naming rules UPSTREAM: mm/damon/dbgfs: fix 'struct pid' leaks in 'dbgfs_target_ids_write()' UPSTREAM: mm/damon/dbgfs: protect targets destructions with kdamond_lock UPSTREAM: mm/damon/vaddr-test: remove unnecessary variables UPSTREAM: mm/damon/vaddr-test: split a test function having >1024 bytes frame size UPSTREAM: mm/damon/vaddr: remove an unnecessary warning message UPSTREAM: mm/damon/core: remove unnecessary error messages UPSTREAM: mm/damon/dbgfs: remove an unnecessary error message UPSTREAM: mm/damon/core: use better timer mechanisms selection threshold UPSTREAM: mm/damon/core: fix fake load reports due to uninterruptible sleeps BACKPORT: timers: implement usleep_idle_range() UPSTREAM: mm/damon/dbgfs: fix missed use of damon_dbgfs_lock UPSTREAM: mm/damon/dbgfs: use '__GFP_NOWARN' for user-specified size buffer allocation UPSTREAM: mm/damon: remove return value from before_terminate callback UPSTREAM: mm/damon: fix a few spelling mistakes in comments and a pr_debug message UPSTREAM: mm/damon: simplify stop mechanism UPSTREAM: mm/damon/dbgfs: add adaptive_targets list check before enable monitor_on UPSTREAM: mm/damon: remove unnecessary variable initialization UPSTREAM: mm/damon: introduce DAMON-based Reclamation (DAMON_RECLAIM) UPSTREAM: selftests/damon: support watermarks UPSTREAM: mm/damon/dbgfs: support watermarks UPSTREAM: mm/damon/schemes: activate schemes based on a watermarks mechanism UPSTREAM: tools/selftests/damon: update for regions prioritization of schemes UPSTREAM: mm/damon/dbgfs: support prioritization weights UPSTREAM: mm/damon/vaddr,paddr: support pageout prioritization UPSTREAM: mm/damon/schemes: prioritize regions within the quotas UPSTREAM: mm/damon/selftests: support schemes quotas UPSTREAM: mm/damon/dbgfs: support quotas of schemes UPSTREAM: mm/damon/schemes: implement time quota UPSTREAM: mm/damon/schemes: skip already charged targets and regions UPSTREAM: mm/damon/schemes: implement size quota for schemes application speed control UPSTREAM: mm/damon/paddr: support the pageout scheme UPSTREAM: mm/damon/dbgfs: remove unnecessary variables UPSTREAM: mm/damon/vaddr: constify static mm_walk_ops UPSTREAM: mm/damon/dbgfs: support physical memory monitoring UPSTREAM: mm/damon: implement primitives for physical address space monitoring UPSTREAM: mm/damon/vaddr: separate commonly usable functions UPSTREAM: mm/damon/dbgfs-test: add a unit test case for 'init_regions' UPSTREAM: mm/damon/dbgfs: allow users to set initial monitoring target regions UPSTREAM: selftests/damon: add 'schemes' debugfs tests UPSTREAM: mm/damon/schemes: implement statistics feature UPSTREAM: mm/damon/dbgfs: support DAMON-based Operation Schemes UPSTREAM: mm/damon/vaddr: support DAMON-based Operation Schemes UPSTREAM: mm/damon/core: implement DAMON-based Operation Schemes (DAMOS) UPSTREAM: mm/damon/core: account age of target regions UPSTREAM: mm/damon/core: nullify pointer ctx->kdamond with a NULL UPSTREAM: mm/damon: needn't hold kdamond_lock to print pid of kdamond UPSTREAM: mm/damon: remove unnecessary do_exit() from kdamond UPSTREAM: mm/damon/core: print kdamond start log in debug mode only UPSTREAM: include/linux/damon.h: fix kernel-doc comments for 'damon_callback' UPSTREAM: mm/damon: grammar s/works/work/ UPSTREAM: mm/damon/core-test: fix wrong expectations for 'damon_split_regions_of()' UPSTREAM: mm/damon: don't use strnlen() with known-bogus source length UPSTREAM: mm/damon: add kunit tests UPSTREAM: mm/damon: add user space selftests UPSTREAM: mm/damon/dbgfs: support multiple contexts UPSTREAM: mm/damon/dbgfs: export kdamond pid to the user space UPSTREAM: mm/damon: implement a debugfs-based user space interface UPSTREAM: mm/damon: add a tracepoint UPSTREAM: mm/damon: implement primitives for the virtual memory address spaces UPSTREAM: mm/idle_page_tracking: make PG_idle reusable UPSTREAM: mm/damon: adaptively adjust regions UPSTREAM: mm/damon/core: implement region-based sampling UPSTREAM: mm: introduce Data Access MONitor (DAMON) BACKPORT: net/packet: fix slab-out-of-bounds access in packet_recvmsg() BACKPORT: fuse: fix pipe buffer lifetime for direct_io BACKPORT: dm: fix NULL pointer issue when free bio UPSTREAM: kfence, x86: fix preemptible warning on KPTI-enabled systems ANDROID: ABI: Update allowed list for galaxy ANDROID: abi_gki_aarch64.xml: update based on proper LTO=full setting BACKPORT: virtio-blk: Use blk_validate_block_size() to validate block size ANDROID: add for tuning readahead size BACKPORT: media: v4l2-mem2mem: Apply DST_QUEUE_OFF_BASE on MMAP buffers across ioctls BACKPORT: nl80211: correctly check NL80211_ATTR_REG_ALPHA2 size BACKPORT: ext4: don't BUG if someone dirty pages without asking ext4 first ANDROID: GKI: Update symbols to abi_gki_aarch64_oplus BACKPORT: iommu: Extend mutex lock scope in iommu_probe_device() BACKPORT: iommu: Fix race condition during default domain allocation ANDROID: GKI: Update symbols to symbol list Conflicts: build.config.common Change-Id: I30e0e3ce2527d66896add9fe45d71924557a46f2 Signed-off-by: Sivasri Kumar, Vanka <quic_svanka@quicinc.com> |
||
|
53f97d77bb |
Merge keystone/android12-5.10-keystone-qcom-release.101+ (a0a7006 ) into msm-5.10
* refs/heads/tmp-a0a7006: ANDROID: Fix the drain_all_pages default condition broken by a hook UPSTREAM: Revert "xfrm: xfrm_state_mtu should return at least 1280 for ipv6" UPSTREAM: xfrm: fix MTU regression FROMGIT: net: fix wrong network header length Change-Id: Ia72d25a98cd228e76a9f466d777d2caafaf82951 Signed-off-by: Sivasri Kumar, Vanka <quic_svanka@quicinc.com> |
||
|
f4c0e37dbc |
ANDROID: Fix the drain_all_pages default condition broken by a hook
The condition introduced by a patch adding a vendor hook to skip drain_all_pages is invalid and changes the default behavior for CMA allocations. Fix the condition to restore default behavior. Fixes: |
||
|
66f0c91b2f |
ANDROID: Fix the drain_all_pages default condition broken by a hook
The condition introduced by a patch adding a vendor hook to skip
drain_all_pages is invalid and changes the default behavior for CMA
allocations. Fix the condition to restore default behavior.
Fixes:
|
||
|
a37eec78a6 |
UPSTREAM: mm: fix unexpected zeroed page mapping with zram swap
commit e914d8f00391520ecc4495dd0ca0124538ab7119 upstream. Two processes under CLONE_VM cloning, user process can be corrupted by seeing zeroed page unexpectedly. CPU A CPU B do_swap_page do_swap_page SWP_SYNCHRONOUS_IO path SWP_SYNCHRONOUS_IO path swap_readpage valid data swap_slot_free_notify delete zram entry swap_readpage zeroed(invalid) data pte_lock map the *zero data* to userspace pte_unlock pte_lock if (!pte_same) goto out_nomap; pte_unlock return and next refault will read zeroed data The swap_slot_free_notify is bogus for CLONE_VM case since it doesn't increase the refcount of swap slot at copy_mm so it couldn't catch up whether it's safe or not to discard data from backing device. In the case, only the lock it could rely on to synchronize swap slot freeing is page table lock. Thus, this patch gets rid of the swap_slot_free_notify function. With this patch, CPU A will see correct data. CPU A CPU B do_swap_page do_swap_page SWP_SYNCHRONOUS_IO path SWP_SYNCHRONOUS_IO path swap_readpage original data pte_lock map the original data swap_free swap_range_free bd_disk->fops->swap_slot_free_notify swap_readpage read zeroed data pte_unlock pte_lock if (!pte_same) goto out_nomap; pte_unlock return on next refault will see mapped data by CPU B The concern of the patch would increase memory consumption since it could keep wasted memory with compressed form in zram as well as uncompressed form in address space. However, most of cases of zram uses no readahead and do_swap_page is followed by swap_free so it will free the compressed form from in zram quickly. Link: https://lkml.kernel.org/r/YjTVVxIAsnKAXjTd@google.com Fixes: |
||
|
812893becb |
Merge keystone/android12-5.10-keystone-qcom-release.101+ (49a1520 ) into msm-5.10
* refs/heads/tmp-49a1520:
BACKPORT: media: v4l2-mem2mem: Apply DST_QUEUE_OFF_BASE on MMAP buffers across ioctls
FROMLIST: remoteproc: Use unbounded workqueue for recovery work
UPSTREAM: xfrm: fix tunnel model fragmentation behavior
ANDROID: GKI: Enable CRYPTO_DES
ANDROID: GKI: set more vfs-only exports into their own namespace
ANDROID: Split ANDROID_STRUCT_PADDING into separate configs
ANDROID: selftests: incfs: skip large_file_test test is not enough free space
ANDROID: selftests: incfs: Add -fno-omit-frame-pointer
ANDROID: incremental-fs: limit mount stack depth
ANDROID: GKI: Update symbols to abi_gki_aarch64_oplus
ANDROID: vendor_hooks: Reduce pointless modversions CRC churn
UPSTREAM: locking/lockdep: Avoid potential access of invalid memory in lock_class
ANDROID: mm: Fix implicit declaration of function 'isolate_lru_page'
ANDROID: GKI: Update symbols to symbol list
ANDROID: GKI: Update symbols to symbol list
ANDROID: GKI: Add hook symbol to symbol list
Revert "ANDROID: dm-bow: Protect Ranges fetched and erased from the RB tree"
ANDROID: vendor_hooks: Add hooks to for free_unref_page_commit
ANDROID: vendor_hooks: Add hooks to for alloc_contig_range
ANDROID: GKI: Update symbols to symbol list
ANDROID: vendor_hooks: Add hook in shrink_node_memcgs
ANDROID: GKI: Add symbols to symbol list
FROMGIT: iommu/iova: Improve 32-bit free space estimate
ANDROID: export walk_page_range and swp_swap_info
ANDROID: vendor_hooks: export shrink_slab
ANDROID: usb: gadget: f_accessory: add compat_ioctl support
UPSTREAM: sr9700: sanity check for packet length
UPSTREAM: io_uring: return back safer resurrect
UPSTREAM: Revert "xfrm: state and policy should fail if XFRMA_IF_ID 0"
UPSTREAM: usb: gadget: don't release an existing dev->buf
UPSTREAM: usb: gadget: clear related members when goto fail
UPSTREAM: usb: gadget: Fix use-after-free bug by not setting udc->dev.driver
UPSTREAM: usb: gadget: rndis: prevent integer overflow in rndis_set_response()
FROMGIT: mm/migrate: fix race between lock page and clear PG_Isolated
UPSTREAM: arm64: proton-pack: Include unprivileged eBPF status in Spectre v2 mitigation reporting
UPSTREAM: arm64: Use the clearbhb instruction in mitigations
UPSTREAM: KVM: arm64: Allow SMCCC_ARCH_WORKAROUND_3 to be discovered and migrated
UPSTREAM: arm64: Mitigate spectre style branch history side channels
UPSTREAM: arm64: Do not include __READ_ONCE() block in assembly files
UPSTREAM: KVM: arm64: Allow indirect vectors to be used without SPECTRE_V3A
UPSTREAM: arm64: proton-pack: Report Spectre-BHB vulnerabilities as part of Spectre-v2
UPSTREAM: arm64: Add percpu vectors for EL1
Revert "BACKPORT: FROMLIST: scsi: core: Reserve one tag for the UFS driver"
UPSTREAM: arm64: entry: Add macro for reading symbol addresses from the trampoline
UPSTREAM: arm64: entry: Add vectors that have the bhb mitigation sequences
UPSTREAM: arm64: entry: Add non-kpti __bp_harden_el1_vectors for mitigations
UPSTREAM: arm64: entry: Allow the trampoline text to occupy multiple pages
UPSTREAM: arm64: entry: Make the kpti trampoline's kpti sequence optional
UPSTREAM: arm64: entry: Move trampoline macros out of ifdef'd section
UPSTREAM: arm64: entry: Don't assume tramp_vectors is the start of the vectors
UPSTREAM: arm64: entry: Allow tramp_alias to access symbols after the 4K boundary
UPSTREAM: arm64: entry: Move the trampoline data page before the text page
UPSTREAM: arm64: entry: Free up another register on kpti's tramp_exit path
UPSTREAM: arm64: entry: Make the trampoline cleanup optional
UPSTREAM: arm64: spectre: Rename spectre_v4_patch_fw_mitigation_conduit
UPSTREAM: arm64: entry.S: Add ventry overflow sanity checks
UPSTREAM: arm64: cpufeature: add HWCAP for FEAT_RPRES
UPSTREAM: arm64: cpufeature: add HWCAP for FEAT_AFP
UPSTREAM: arm64: add ID_AA64ISAR2_EL1 sys register
UPSTREAM: arm64: Add HWCAP for self-synchronising virtual counter
UPSTREAM: arm64: Add Cortex-X2 CPU part definition
UPSTREAM: arm64: cputype: Add CPU implementor & types for the Apple M1 cores
Linux 5.10.101
iommu: Fix potential use-after-free during probe
perf: Fix list corruption in perf_cgroup_switch()
arm64: dts: imx8mq: fix lcdif port node
scsi: lpfc: Reduce log messages seen after firmware download
scsi: lpfc: Remove NVMe support if kernel has NVME_FC disabled
can: isotp: fix error path in isotp_sendmsg() to unlock wait queue
Makefile.extrawarn: Move -Wunaligned-access to W=1
hwmon: (dell-smm) Speed up setting of fan speed
phy: ti: Fix missing sentinel for clk_div_table
speakup-dectlk: Restore pitch setting
USB: serial: cp210x: add CPI Bulk Coin Recycler id
USB: serial: cp210x: add NCR Retail IO box id
USB: serial: ch341: add support for GW Instek USB2.0-Serial devices
USB: serial: option: add ZTE MF286D modem
USB: serial: ftdi_sio: add support for Brainboxes US-159/235/320
usb: raw-gadget: fix handling of dual-direction-capable endpoints
usb: gadget: f_uac2: Define specific wTerminalType
usb: gadget: rndis: check size of RNDIS_MSG_SET command
USB: gadget: validate interface OS descriptor requests
usb: gadget: udc: renesas_usb3: Fix host to USB_ROLE_NONE transition
usb: dwc3: gadget: Prevent core from processing stale TRBs
usb: ulpi: Call of_node_put correctly
usb: ulpi: Move of_node_put to ulpi_dev_release
net: usb: ax88179_178a: Fix out-of-bounds accesses in RX fixup
Revert "usb: dwc2: drd: fix soft connect when gadget is unconfigured"
usb: dwc2: drd: fix soft connect when gadget is unconfigured
eeprom: ee1004: limit i2c reads to I2C_SMBUS_BLOCK_MAX
n_tty: wake up poll(POLLRDNORM) on receiving data
vt_ioctl: add array_index_nospec to VT_ACTIVATE
vt_ioctl: fix array_index_nospec in vt_setactivate
net: dsa: mv88e6xxx: fix use-after-free in mv88e6xxx_mdios_unregister
net: mscc: ocelot: fix mutex lock error during ethtool stats read
ice: fix IPIP and SIT TSO offload
ice: fix an error code in ice_cfg_phy_fec()
dpaa2-eth: unregister the netdev before disconnecting from the PHY
net: amd-xgbe: disable interrupts during pci removal
tipc: rate limit warning for received illegal binding update
net: mdio: aspeed: Add missing MODULE_DEVICE_TABLE
veth: fix races around rq->rx_notify_masked
net: fix a memleak when uncloning an skb dst and its metadata
net: do not keep the dst cache when uncloning an skb dst and its metadata
nfp: flower: fix ida_idx not being released
ipmr,ip6mr: acquire RTNL before calling ip[6]mr_free_table() on failure path
net: dsa: lantiq_gswip: don't use devres for mdiobus
net: dsa: felix: don't use devres for mdiobus
net: dsa: bcm_sf2: don't use devres for mdiobus
net: dsa: ar9331: register the mdiobus under devres
net: dsa: mv88e6xxx: don't use devres for mdiobus
bonding: pair enable_port with slave_arr_updates
gpio: sifive: use the correct register to read output values
ACPI: PM: s2idle: Cancel wakeup before dispatching EC GPE
drm/panel: simple: Assign data from panel_dpi_probe() correctly
ixgbevf: Require large buffers for build_skb on 82599VF
arm64: dts: meson-g12b-odroid-n2: fix typo 'dio2133'
netfilter: ctnetlink: disable helper autoassign
misc: fastrpc: avoid double fput() on failed usercopy
drm/vc4: hdmi: Allow DBLCLK modes even if horz timing is odd.
gpio: aggregator: Fix calling into sleeping GPIO controllers
usb: f_fs: Fix use-after-free for epfile
ARM: dts: imx7ulp: Fix 'assigned-clocks-parents' typo
phy: xilinx: zynqmp: Fix bus width setting for SGMII
ARM: dts: imx6qdl-udoo: Properly describe the SD card detect
staging: fbtft: Fix error path in fbtft_driver_module_init()
ARM: dts: meson8b: Fix the UART device-tree schema validation
ARM: dts: meson8: Fix the UART device-tree schema validation
ARM: dts: meson: Fix the UART compatible strings
ARM: dts: Fix timer regression for beagleboard revision c
drm/rockchip: vop: Correct RK3399 VOP register fields
PM: s2idle: ACPI: Fix wakeup interrupts handling
ACPI/IORT: Check node revision for PMCG resources
nvme-tcp: fix bogus request completion when failing to send AER
ARM: socfpga: fix missing RESET_CONTROLLER
ARM: dts: Fix boot regression on Skomer
ARM: dts: imx23-evk: Remove MX23_PAD_SSP1_DETECT from hog group
riscv: fix build with binutils 2.38
KVM: VMX: Set vmcs.PENDING_DBG.BS on #DB in STI/MOVSS blocking shadow
KVM: SVM: Don't kill SEV guest if SMAP erratum triggers in usermode
KVM: nVMX: Also filter MSR_IA32_VMX_TRUE_PINBASED_CTLS when eVMCS
KVM: nVMX: eVMCS: Filter out VM_EXIT_SAVE_VMX_PREEMPTION_TIMER
KVM: eventfd: Fix false positive RCU usage warning
net: stmmac: dwmac-sun8i: use return val of readl_poll_timeout()
nvme-pci: add the IGNORE_DEV_SUBNQN quirk for Intel P4500/P4600 SSDs
perf: Always wake the parent event
usb: dwc2: gadget: don't try to disable ep0 in dwc2_hsotg_suspend
PM: hibernate: Remove register_nosave_region_late()
scsi: myrs: Fix crash in error case
scsi: ufs: Treat link loss as fatal error
scsi: pm8001: Fix bogus FW crash for maxcpus=1
scsi: qedf: Fix refcount issue when LOGO is received during TMF
scsi: qedf: Add stag_work to all the vports
scsi: ufs: ufshcd-pltfrm: Check the return value of devm_kstrdup()
scsi: target: iscsi: Make sure the np under each tpg is unique
powerpc/fixmap: Fix VM debug warning on unmap
net: sched: Clarify error message when qdisc kind is unknown
drm: panel-orientation-quirks: Add quirk for the 1Netbook OneXPlayer
x86/perf: Avoid warning for Arch LBR without XSAVE
NFSv4 handle port presence in fs_location server string
NFSv4 expose nfs_parse_server_name function
NFSv4 remove zero number of fs_locations entries error check
NFSv4.1: Fix uninitialised variable in devicenotify
nfs: nfs4clinet: check the return value of kstrdup()
NFSv4 only print the label when its queried
NFS: change nfs_access_get_cached to only report the mask
tracing: Propagate is_signed to expression
drm/amdgpu: Set a suitable dev_info.gart_page_size
NFSD: Fix offset type in I/O trace points
NFSD: Clamp WRITE offsets
NFS: Fix initialisation of nfs_client cl_flags field
net: phy: marvell: Fix MDI-x polarity setting in 88e1118-compatible PHYs
net: phy: marvell: Fix RGMII Tx/Rx delays setting in 88e1121-compatible PHYs
can: isotp: fix potential CAN frame reception race in isotp_rcv()
mmc: sdhci-of-esdhc: Check for error num after setting mask
ima: Do not print policy rule with inactive LSM labels
ima: Allow template selection with ima_template[_fmt]= after ima_hash=
ima: Remove ima_policy file before directory
integrity: check the return value of audit_log_start()
Linux 5.10.100
tipc: improve size validations for received domain records
crypto: api - Move cryptomgr soft dependency into algapi
KVM: s390: Return error on SIDA memop on normal guest
moxart: fix potential use-after-free on remove path
Linux 5.10.99
selftests: nft_concat_range: add test for reload with no element add/del
cgroup/cpuset: Fix "suspicious RCU usage" lockdep warning
net: dsa: mt7530: make NET_DSA_MT7530 select MEDIATEK_GE_PHY
ext4: fix incorrect type issue during replay_del_range
ext4: fix error handling in ext4_fc_record_modified_inode()
ext4: fix error handling in ext4_restore_inline_data()
ext4: modify the logic of ext4_mb_new_blocks_simple
ext4: prevent used blocks from being allocated during fast commit replay
EDAC/xgene: Fix deferred probing
EDAC/altera: Fix deferred probing
x86/perf: Default set FREEZE_ON_SMI for all
perf/x86/intel/pt: Fix crash with stop filters in single-range mode
perf stat: Fix display of grouped aliased events
fbcon: Add option to enable legacy hardware acceleration
Revert "fbcon: Disable accelerated scrolling"
rtc: cmos: Evaluate century appropriate
tools/resolve_btfids: Do not print any commands when building silently
selftests: futex: Use variable MAKE instead of make
selftests/exec: Remove pipe from TEST_GEN_FILES
bpf: Use VM_MAP instead of VM_ALLOC for ringbuf
gve: fix the wrong AdminQ buffer queue index check
nfsd: nfsd4_setclientid_confirm mistakenly expires confirmed client.
scsi: bnx2fc: Make bnx2fc_recv_frame() mp safe
pinctrl: bcm2835: Fix a few error paths
pinctrl: intel: fix unexpected interrupt
pinctrl: intel: Fix a glitch when updating IRQ flags on a preconfigured line
ASoC: max9759: fix underflow in speaker_gain_control_put()
ASoC: cpcap: Check for NULL pointer after calling of_get_child_by_name
ASoC: xilinx: xlnx_formatter_pcm: Make buffer bytes multiple of period bytes
ASoC: fsl: Add missing error handling in pcm030_fabric_probe
drm/i915/overlay: Prevent divide by zero bugs in scaling
net: stmmac: ensure PTP time register reads are consistent
net: stmmac: dump gmac4 DMA registers correctly
net: macsec: Verify that send_sci is on when setting Tx sci explicitly
net: macsec: Fix offload support for NETDEV_UNREGISTER event
net: ieee802154: Return meaningful error codes from the netlink helpers
net: ieee802154: ca8210: Stop leaking skb's
net: ieee802154: mcr20a: Fix lifs/sifs periods
net: ieee802154: hwsim: Ensure proper channel selection at probe time
spi: uniphier: fix reference count leak in uniphier_spi_probe()
spi: meson-spicc: add IRQ check in meson_spicc_probe
spi: mediatek: Avoid NULL pointer crash in interrupt
spi: bcm-qspi: check for valid cs before applying chip select
iommu/amd: Fix loop timeout issue in iommu_ga_log_enable()
iommu/vt-d: Fix potential memory leak in intel_setup_irq_remapping()
RDMA/mlx4: Don't continue event handler after memory allocation failure
RDMA/siw: Fix broken RDMA Read Fence/Resume logic.
IB/rdmavt: Validate remote_addr during loopback atomic tests
RDMA/ucma: Protect mc during concurrent multicast leaves
RDMA/cma: Use correct address when leaving multicast group
memcg: charge fs_context and legacy_fs_context
Revert "ASoC: mediatek: Check for error clk pointer"
IB/hfi1: Fix AIP early init panic
dma-buf: heaps: Fix potential spectre v1 gadget
block: bio-integrity: Advance seed correctly for larger interval sizes
mm/kmemleak: avoid scanning potential huge holes
mm/pgtable: define pte_index so that preprocessor could recognize it
mm/debug_vm_pgtable: remove pte entry from the page table
nvme-fabrics: fix state check in nvmf_ctlr_matches_baseopts()
drm/amd/display: Force link_rate as LINK_RATE_RBR2 for 2018 15" Apple Retina panels
drm/nouveau: fix off by one in BIOS boundary checking
btrfs: fix deadlock between quota disable and qgroup rescan worker
ALSA: hda/realtek: Fix silent output on Gigabyte X570 Aorus Xtreme after reboot from Windows
ALSA: hda/realtek: Fix silent output on Gigabyte X570S Aorus Master (newer chipset)
ALSA: hda/realtek: Add missing fixup-model entry for Gigabyte X570 ALC1220 quirks
ALSA: hda/realtek: Add quirk for ASUS GU603
ALSA: hda: realtek: Fix race at concurrent COEF updates
ALSA: hda: Fix UAF of leds class devs at unbinding
ALSA: usb-audio: Correct quirk for VF0770
ASoC: ops: Reject out of bounds values in snd_soc_put_xr_sx()
ASoC: ops: Reject out of bounds values in snd_soc_put_volsw_sx()
ASoC: ops: Reject out of bounds values in snd_soc_put_volsw()
audit: improve audit queue handling when "audit=1" on cmdline
selinux: fix double free of cond_list on error paths
Revert "perf: Fix perf_event_read_local() time"
Linux 5.10.98
Revert "drm/vc4: hdmi: Make sure the device is powered with CEC" again
Revert "drm/vc4: hdmi: Make sure the device is powered with CEC"
Linux 5.10.97
tcp: add missing tcp_skb_can_collapse() test in tcp_shift_skb_data()
af_packet: fix data-race in packet_setsockopt / packet_setsockopt
cpuset: Fix the bug that subpart_cpus updated wrongly in update_cpumask()
rtnetlink: make sure to refresh master_dev/m_ops in __rtnl_newlink()
net: sched: fix use-after-free in tc_new_tfilter()
fanotify: Fix stale file descriptor in copy_event_to_user()
net: amd-xgbe: Fix skb data length underflow
net: amd-xgbe: ensure to reset the tx_timer_active flag
ipheth: fix EOVERFLOW in ipheth_rcvbulk_callback
net/mlx5: E-Switch, Fix uninitialized variable modact
net/mlx5: Use del_timer_sync in fw reset flow of halting poll
net/mlx5e: Fix handling of wrong devices during bond netevent
cgroup-v1: Require capabilities to set release_agent
drm/vc4: hdmi: Make sure the device is powered with CEC
x86/cpu: Add Xeon Icelake-D to list of CPUs that support PPIN
x86/mce: Add Xeon Sapphire Rapids to list of CPUs that support PPIN
psi: Fix uaf issue when psi trigger is destroyed while being polled
KVM: x86: Forcibly leave nested virt when SMM state is toggled
Revert "drivers: bus: simple-pm-bus: Add support for probing simple bus only devices"
net: ipa: prevent concurrent replenish
net: ipa: use a bitmap for endpoint replenish_enabled
net: ipa: fix atomic update in ipa_endpoint_replenish()
PCI: pciehp: Fix infinite loop in IRQ handler upon power fault
Linux 5.10.96
mtd: rawnand: mpc5121: Remove unused variable in ads5121_select_chip()
block: Fix wrong offset in bio_truncate()
fsnotify: invalidate dcache before IN_DELETE event
usr/include/Makefile: add linux/nfc.h to the compile-test coverage
dt-bindings: can: tcan4x5x: fix mram-cfg RX FIFO config
net: bridge: vlan: fix memory leak in __allowed_ingress
ipv4: remove sparse error in ip_neigh_gw4()
ipv4: tcp: send zero IPID in SYNACK messages
ipv4: raw: lock the socket in raw_bind()
net: bridge: vlan: fix single net device option dumping
Revert "ipv6: Honor all IPv6 PIO Valid Lifetime values"
net: hns3: handle empty unknown interrupt for VF
net: cpsw: Properly initialise struct page_pool_params
yam: fix a memory leak in yam_siocdevprivate()
drm/msm/dpu: invalid parameter check in dpu_setup_dspp_pcc
drm/msm/hdmi: Fix missing put_device() call in msm_hdmi_get_phy
video: hyperv_fb: Fix validation of screen resolution
ibmvnic: don't spin in tasklet
ibmvnic: init ->running_cap_crqs early
ipv4: fix ip option filtering for locally generated fragments
net: ipv4: Fix the warning for dereference
net: ipv4: Move ip_options_fragment() out of loop
powerpc/perf: Fix power_pmu_disable to call clear_pmi_irq_pending only if PMI is pending
hwmon: (lm90) Mark alert as broken for MAX6654
efi/libstub: arm64: Fix image check alignment at entry
rxrpc: Adjust retransmission backoff
octeontx2-pf: Forward error codes to VF
phylib: fix potential use-after-free
net: phy: broadcom: hook up soft_reset for BCM54616S
sched/pelt: Relax the sync of util_sum with util_avg
perf: Fix perf_event_read_local() time
kernel: delete repeated words in comments
netfilter: conntrack: don't increment invalid counter on NF_REPEAT
powerpc64/bpf: Limit 'ldbrx' to processors compliant with ISA v2.06
NFS: Ensure the server has an up to date ctime before renaming
NFS: Ensure the server has an up to date ctime before hardlinking
ipv6: annotate accesses to fn->fn_sernum
drm/msm/dsi: invalid parameter check in msm_dsi_phy_enable
drm/msm/dsi: Fix missing put_device() call in dsi_get_phy
drm/msm: Fix wrong size calculation
net-procfs: show net devices bound packet types
NFSv4: nfs_atomic_open() can race when looking up a non-regular file
NFSv4: Handle case where the lookup of a directory fails
hwmon: (lm90) Reduce maximum conversion rate for G781
ipv4: avoid using shared IP generator for connected sockets
ping: fix the sk_bound_dev_if match in ping_lookup
hwmon: (lm90) Mark alert as broken for MAX6680
hwmon: (lm90) Mark alert as broken for MAX6646/6647/6649
net: fix information leakage in /proc/net/ptype
ipv6_tunnel: Rate limit warning messages
scsi: bnx2fc: Flush destroy_work queue before calling bnx2fc_interface_put()
rpmsg: char: Fix race between the release of rpmsg_eptdev and cdev
rpmsg: char: Fix race between the release of rpmsg_ctrldev and cdev
usb: roles: fix include/linux/usb/role.h compile issue
i40e: fix unsigned stat widths
i40e: Fix for failed to init adminq while VF reset
i40e: Fix queues reservation for XDP
i40e: Fix issue when maximum queues is exceeded
i40e: Increase delay to 1 s after global EMP reset
powerpc/32: Fix boot failure with GCC latent entropy plugin
powerpc/32s: Fix kasan_init_region() for KASAN
powerpc/32s: Allocate one 256k IBAT instead of two consecutives 128k IBATs
x86/MCE/AMD: Allow thresholding interface updates after init
sched/membarrier: Fix membarrier-rseq fence command missing from query bitmask
ocfs2: fix a deadlock when commit trans
jbd2: export jbd2_journal_[grab|put]_journal_head
ucsi_ccg: Check DEV_INT bit only when starting CCG4
usb: typec: tcpm: Do not disconnect while receiving VBUS off
USB: core: Fix hang in usb_kill_urb by adding memory barriers
usb: gadget: f_sourcesink: Fix isoc transfer for USB_SPEED_SUPER_PLUS
usb: common: ulpi: Fix crash in ulpi_match()
usb: xhci-plat: fix crash when suspend if remote wake enable
usb-storage: Add unusual-devs entry for VL817 USB-SATA bridge
tty: Add support for Brainboxes UC cards.
tty: n_gsm: fix SW flow control encoding/handling
serial: stm32: fix software flow control transfer
serial: 8250: of: Fix mapped region size when using reg-offset property
netfilter: nft_payload: do not update layer 4 checksum when mangling fragments
arm64: errata: Fix exec handling in erratum
|
||
|
e5b4949bfc |
ANDROID: vendor_hooks: tune reclaim scan type for specified mem_cgroup
Add memcg support for hooks in the reclaim path Bug: 230450931 Change-Id: Ia3e6949985d915c8640139fbb93800d91e1e46f8 Signed-off-by: xiaofeng <xiaofeng5@xiaomi.com> |
||
|
0453acd7fb |
FROMLIST: mm/damon/reclaim: Fix the timer always stays active
The timer stays active even if the reclaim mechanism is never enabled. It is unnecessary overhead can be completely avoided by using module_param_cb() for enabled flag. Signed-off-by: Hailong Tu <tuhailong@gmail.com> Link: https://lore.kernel.org/all/20220421125910.1052459-1-tuhailong@gmail.com/ Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: I77591e41ce424ce16a4a5c70e7a86cdae996a354 |
||
|
2522f6c4da |
BACKPORT: treewide: Add missing includes masked by cgroup -> bpf dependency
cgroup.h (therefore swap.h, therefore half of the universe) includes bpf.h which in turn includes module.h and slab.h. Since we're about to get rid of that dependency we need to clean things up. v2: drop the cpu.h include from cacheinfo.h, it's not necessary and it makes riscv sensitive to ordering of include files. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Acked-by: Krzysztof Wilczyński <kw@linux.com> Acked-by: Peter Chen <peter.chen@kernel.org> Acked-by: SeongJae Park <sj@kernel.org> Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/all/20211120035253.72074-1-kuba@kernel.org/ # v1 Link: https://lore.kernel.org/all/20211120165528.197359-1-kuba@kernel.org/ # cacheinfo discussion Link: https://lore.kernel.org/bpf/20211202203400.1208663-1-kuba@kernel.org (cherry picked from commit 8581fd402a0cf80b5298e3b225e7a7bd8f110e69) Dropped all the changes except for the ones made in mm/damon/vaddr.c Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: Ib64ecbe4e06f192ed576af77e03e6b49d538bac9 |
||
|
94006b8a3a |
UPSTREAM: mm/damon: hide kernel pointer from tracepoint event
DAMON's virtual address spaces monitoring primitive uses 'struct pid *' of the target process as its monitoring target id. The kernel address is exposed as-is to the user space via the DAMON tracepoint, 'damon_aggregated'. Though primarily only privileged users are allowed to access that, it would be better to avoid unnecessarily exposing kernel pointers so. Because the trace result is only required to be able to distinguish each target, we aren't need to use the pointer as-is. This makes the tracepoint to use the index of the target in the context's targets list as its id in the tracepoint, to hide the kernel space address. Link: https://lkml.kernel.org/r/20211229131016.23641-5-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit 76fd0285b447991267e838842c0be7395eb454bb) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: Iee4a6f56cf9bf5f61fb95f438dfc3316c10198e5 |
||
|
4c350065aa |
UPSTREAM: mm/damon/vaddr: hide kernel pointer from damon_va_three_regions() failure log
The failure log message for 'damon_va_three_regions()' prints the target id, which is a 'struct pid' pointer in the case. To avoid exposing the kernel pointer via the log, this makes the log to use the index of the target in the context's targets list instead. Link: https://lkml.kernel.org/r/20211229131016.23641-4-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit 962fe7a6b1b2f9deb1b31b3344afa3b11afdf7ab) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: I6b9b09a9b7024630f05ec41db030006d63f47ce1 |
||
|
c44028a162 |
UPSTREAM: mm/damon/vaddr: use pr_debug() for damon_va_three_regions() failure logging
Failure of 'damon_va_three_regions()' is logged using 'pr_err()'. But, the function can fail in legal situations. To avoid making users be surprised and to keep the kernel clean, this makes the log to be printed using 'pr_debug()'. Link: https://lkml.kernel.org/r/20211229131016.23641-3-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit 251403f19aab6a122f4dcfb14149814e85564202) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: I0a2c08d856d0067af6af7a008e89f63fa5fac381 |
||
|
98dcd2427c |
UPSTREAM: mm/damon/dbgfs: remove an unnecessary variable
Patch series "mm/damon: Hide unnecessary information disclosures". DAMON is exposing some unnecessary information including kernel pointer in kernel log and tracepoint. This patchset hides such information. The first patch is only for a trivial cleanup, though. This patch (of 4): This commit removes a unnecessarily used variable in dbgfs_target_ids_write(). Link: https://lkml.kernel.org/r/20211229131016.23641-1-sj@kernel.org Link: https://lkml.kernel.org/r/20211229131016.23641-2-sj@kernel.org Fixes: 4bc05954d007 ("mm/damon: implement a debugfs-based user space interface") Signed-off-by: SeongJae Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit 70b8480812d0a3930049a44820a1fa149b090c10) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: I774c900de92780ae9ebf09f01c0b0536eb43f822 |
||
|
21dc18f9a0 |
UPSTREAM: mm/damon: move the implementation of damon_insert_region to damon.h
Usually, inline function is declared static since it should sit between storage and type. And implement it in a header file if used by multiple files. And this change also fixes compile issue when backport damon to 5.10. mm/damon/vaddr.c: In function `damon_va_evenly_split_region': ./include/linux/damon.h:425:13: error: inlining failed in call to `always_inline' `damon_insert_region': function body not available 425 | inline void damon_insert_region(struct damon_region *r, | ^~~~~~~~~~~~~~~~~~~ mm/damon/vaddr.c:86:3: note: called from here 86 | damon_insert_region(n, r, next, t); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Link: https://lkml.kernel.org/r/20211223085703.6142-1-guoqing.jiang@linux.dev Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev> Reviewed-by: SeongJae Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit 2cd4b8e10cc31eadb5b10b1d73b3f28156f3776c) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: Iaa05318092b8e98bfbfc72a8c5df2cb6de97d224 |
||
|
73faa856e9 |
UPSTREAM: mm/damon: add access checking for hugetlb pages
The process's VMAs can be mapped by hugetlb page, but now the DAMON did not implement the access checking for hugetlb pte, so we can not get the actual access count like below if a process VMAs were mapped by hugetlb. damon_aggregated: target_id=18446614368406014464 nr_regions=12 4194304-5476352: 0 545 damon_aggregated: target_id=18446614368406014464 nr_regions=12 140662370467840-140662372970496: 0 545 damon_aggregated: target_id=18446614368406014464 nr_regions=12 140662372970496-140662375460864: 0 545 damon_aggregated: target_id=18446614368406014464 nr_regions=12 140662375460864-140662377951232: 0 545 damon_aggregated: target_id=18446614368406014464 nr_regions=12 140662377951232-140662380449792: 0 545 damon_aggregated: target_id=18446614368406014464 nr_regions=12 140662380449792-140662382944256: 0 545 ...... Thus this patch adds hugetlb access checking support, with this patch we can see below VMA mapped by hugetlb access count. damon_aggregated: target_id=18446613056935405824 nr_regions=12 140296486649856-140296489914368: 1 3 damon_aggregated: target_id=18446613056935405824 nr_regions=12 140296489914368-140296492978176: 1 3 damon_aggregated: target_id=18446613056935405824 nr_regions=12 140296492978176-140296495439872: 1 3 damon_aggregated: target_id=18446613056935405824 nr_regions=12 140296495439872-140296498311168: 1 3 damon_aggregated: target_id=18446613056935405824 nr_regions=12 140296498311168-140296501198848: 1 3 damon_aggregated: target_id=18446613056935405824 nr_regions=12 140296501198848-140296504320000: 1 3 damon_aggregated: target_id=18446613056935405824 nr_regions=12 140296504320000-140296507568128: 1 2 ...... [baolin.wang@linux.alibaba.com: fix unused var warning] Link: https://lkml.kernel.org/r/1aaf9c11-0d8e-b92d-5c92-46e50a6e8d4e@linux.alibaba.com [baolin.wang@linux.alibaba.com: v3] Link: https://lkml.kernel.org/r/486927ecaaaecf2e3a7fbe0378ec6e1c58b50747.1640852276.git.baolin.wang@linux.alibaba.com Link: https://lkml.kernel.org/r/6afcbd1fda5f9c7c24f320d26a98188c727ceec3.1639623751.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com> Reviewed-by: SeongJae Park <sj@kernel.org> Cc: Mike Kravetz <mike.kravetz@oracle.com> Cc: Randy Dunlap <rdunlap@infradead.org> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit 49f4203aae06ba9d67b500c90339b262b0a52637) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: Id7c86f5c0344efef150b3b27f662b696263947ed |
||
|
b0cf3ac6d3 |
UPSTREAM: mm/damon/dbgfs: support all DAMOS stats
Currently, DAMON debugfs interface is not supporting DAMON-based Operation Schemes (DAMOS) stats for schemes successfully applied regions and time/space quota limit exceeds. This adds the support. Link: https://lkml.kernel.org/r/20211210150016.35349-6-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit 3a619fdb8de8a3ecd4200e7d183d2c8ceb32289e) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: Ide3cfaff1b63e053ece5a8746a463fb87ef6c607 |
||
|
1c400b8796 |
UPSTREAM: mm/damon/reclaim: provide reclamation statistics
This implements new DAMON_RECLAIM parameters for statistics reporting. Those can be used for understanding how DAMON_RECLAIM is working, and for tuning the other parameters. Link: https://lkml.kernel.org/r/20211210150016.35349-4-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit 60e52e7c46a127bca5ddd48b89002564f3862063) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: I721bdacb3b2d8b41154296f5dbf8ef48c5dd0744 |
||
|
f755f1a2bc |
UPSTREAM: mm/damon/schemes: account how many times quota limit has exceeded
If the time/space quotas of a given DAMON-based operation scheme is too small, the scheme could show unexpectedly slow progress. However, there is no good way to notice the case in runtime. This commit extends the DAMOS stat to provide how many times the quota limits exceeded so that the users can easily notice the case and tune the scheme. Link: https://lkml.kernel.org/r/20211210150016.35349-3-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit 6268eac34ca30af7f6313504d556ec7fcd295621) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: I36184dc51917810c81ac8d576b144e33a4454dc1 |
||
|
7cecfab158 |
UPSTREAM: mm/damon/schemes: account scheme actions that successfully applied
Patch series "mm/damon/schemes: Extend stats for better online analysis and tuning". To help online access pattern analysis and tuning of DAMON-based Operation Schemes (DAMOS), DAMOS provides simple statistics for each scheme. Introduction of DAMOS time/space quota further made the tuning easier by making the risk management easier. However, that also made understanding of the working schemes a little bit more difficult. For an example, progress of a given scheme can now be throttled by not only the aggressiveness of the target access pattern, but also the time/space quotas. So, when a scheme is showing unexpectedly slow progress, it's difficult to know by what the progress of the scheme is throttled, with currently provided statistics. This patchset extends the statistics to contain some metrics that can be helpful for such online schemes analysis and tuning (patches 1-2), exports those to users (patches 3 and 5), and add documents (patches 4 and 6). This patch (of 6): DAMON-based operation schemes (DAMOS) stats provide only the number and the amount of regions that the action of the scheme has tried to be applied. Because the action could be failed for some reasons, the currently provided information is sometimes not useful or convenient enough for schemes profiling and tuning. To improve this situation, this commit extends the DAMOS stats to provide the number and the amount of regions that the action has successfully applied. Link: https://lkml.kernel.org/r/20211210150016.35349-1-sj@kernel.org Link: https://lkml.kernel.org/r/20211210150016.35349-2-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit 0e92c2ee9f459542c5384d9cfab24873c3dd6398) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: Iddfe9257cb99091404202576a1addc5cc340cb8b |
||
|
943c0cd13f |
UPSTREAM: mm/damon: convert macro functions to static inline functions
Patch series "mm/damon: Misc cleanups". This patchset contains miscellaneous cleanups for DAMON's macro functions and documentation. This patch (of 6): This commit converts macro functions in DAMON to static inline functions, for better type checking, code documentation, etc[1]. [1] https://lore.kernel.org/linux-mm/20211202151213.6ec830863342220da4141bc5@linux-foundation.org/ Link: https://lkml.kernel.org/r/20211209131806.19317-1-sj@kernel.org Link: https://lkml.kernel.org/r/20211209131806.19317-2-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit 88f86dcfa454784f7de550966c60fc78a3e95d6d) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: Id1e4e08a844b49cf3572cb3ac02158f5c1909ea2 |
||
|
947d088b1f |
UPSTREAM: mm/damon: move damon_rand() definition into damon.h
damon_rand() is called in three files:damon/core.c, damon/ paddr.c, damon/vaddr.c, i think there is no need to redefine this twice, So move it to damon.h will be a good choice. Link: https://lkml.kernel.org/r/20211202075859.51341-1-xhao@linux.alibaba.com Signed-off-by: Xin Hao <xhao@linux.alibaba.com> Reviewed-by: SeongJae Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit 9b2a38d6ef25c1748e3964b0ff30a89e4ed26583) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: Ib7be3062385fac4b422faa86705968aa39095a72 |
||
|
b45423116e |
UPSTREAM: mm/damon/schemes: add the validity judgment of thresholds
In dbgfs "schemes" interface, i do some test like this: # cd /sys/kernel/debug/damon # echo "2 1 2 1 10 1 3 10 1 1 1 1 1 1 1 1 2 3" > schemes # cat schemes # 2 1 2 1 10 1 3 10 1 1 1 1 1 1 1 1 2 3 0 0 There have some unreasonable places, i set the valules of these variables "<min_sz, max_sz> <min_nr_a, max_nr_a>, <min_age, max_age>, <wmarks.high, wmarks.mid, wmarks.low>" as "<2, 1>, <2, 1>, <10, 1>, <1, 2, 3>. So there add a validity judgment for these thresholds value. Link: https://lkml.kernel.org/r/d78360e52158d786fcbf20bc62c96785742e76d3.1637239568.git.xhao@linux.alibaba.com Signed-off-by: Xin Hao <xhao@linux.alibaba.com> Reviewed-by: SeongJae Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit c89ae63eb0662b6c9f82dbfad3ef010239b8c1b1) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: I2b23124b95ebeac935f28f9632dccaeabace4533 |
||
|
b198e86d5a |
UPSTREAM: mm/damon/vaddr: remove swap_ranges() and replace it with swap()
Remove 'swap_ranges()' and replace it with the macro 'swap()' defined in 'include/linux/minmax.h' to simplify code and improve efficiency Link: https://lkml.kernel.org/r/20211111115355.2808-1-hanyihao@vivo.com Signed-off-by: Yihao Han <hanyihao@vivo.com> Reviewed-by: SeongJae Park <sj@kernel.org> Reviewed-by: Muchun Song <songmuchun@bytedance.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit 8bd0b9da03c9154e279b1a502636103887b9fbed) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: Icf565b52a7642fb830ae004764ca496986aed82a |
||
|
9a8de9c702 |
UPSTREAM: mm/damon: remove some unneeded function definitions in damon.h
In damon.h some func definitions about VA & PA can only be used in its own file, so there no need to define in the header file, and the header file will look cleaner. If other files later need these functions, the prototypes can be added to damon.h at that time. [sj@kernel.org: remove unnecessary function prototype position changes] Link: https://lkml.kernel.org/r/20211118114827.20052-1-sj@kernel.org Link: https://lkml.kernel.org/r/45fd5b3ef6cce8e28dbc1c92f9dc845ccfc949d7.1636989871.git.xhao@linux.alibaba.com Signed-off-by: Xin Hao <xhao@linux.alibaba.com> Signed-off-by: SeongJae Park <sj@kernel.org> Reviewed-by: SeongJae Park <sj@kernel.org> Cc: Muchun Song <songmuchun@bytedance.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit cdeed009f3bceee41f73f0137db785fd29a05cb8) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: I2203b9c8e4625493797e1f3e506431799c4404c9 |
||
|
07045a0e5a |
UPSTREAM: mm/damon/core: use abs() instead of diff_of()
In kernel, we can use abs(a - b) to get the absolute value, So there is no need to redefine a new one. Link: https://lkml.kernel.org/r/b24e7b82d9efa90daf150d62dea171e19390ad0b.1636989871.git.xhao@linux.alibaba.com Signed-off-by: Xin Hao <xhao@linux.alibaba.com> Reviewed-by: Muchun Song <songmuchun@bytedance.com> Reviewed-by: SeongJae Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit d720bbbd70e968f8a0257393b575c3a29b56f990) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: Iab418bdc79cea24a175c2c5e17ab7ee393df6c47 |
||
|
8b02bed759 |
UPSTREAM: mm/damon: unified access_check function naming rules
Patch series "mm/damon: Do some small changes", v4. This patch (of 4): In damon/paddr.c file, two functions names start with underscore, static void __damon_pa_prepare_access_check(struct damon_ctx *ctx, struct damon_region *r) static void __damon_pa_prepare_access_check(struct damon_ctx *ctx, struct damon_region *r) In damon/vaddr.c file, there are also two functions with the same function, static void damon_va_prepare_access_check(struct damon_ctx *ctx, struct mm_struct *mm, struct damon_region *r) static void damon_va_check_access(struct damon_ctx *ctx, struct mm_struct *mm, struct damon_region *r) It makes sense to keep consistent, and it is not easy to be confused with the function that call them. Link: https://lkml.kernel.org/r/cover.1636989871.git.xhao@linux.alibaba.com Link: https://lkml.kernel.org/r/529054aed932a42b9c09fc9977ad4574b9e7b0bd.1636989871.git.xhao@linux.alibaba.com Signed-off-by: Xin Hao <xhao@linux.alibaba.com> Reviewed-by: SeongJae Park <sj@kernel.org> Cc: Muchun Song <songmuchun@bytedance.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit b627b774911660852ce7f3f3817955ddad2bd130) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: I180e7f068ed4745c5fbc0e2a81320b7fda03c52e |
||
|
d4d20c7ef5 |
UPSTREAM: mm/damon/dbgfs: fix 'struct pid' leaks in 'dbgfs_target_ids_write()'
DAMON debugfs interface increases the reference counts of 'struct pid's for targets from the 'target_ids' file write callback ('dbgfs_target_ids_write()'), but decreases the counts only in DAMON monitoring termination callback ('dbgfs_before_terminate()'). Therefore, when 'target_ids' file is repeatedly written without DAMON monitoring start/termination, the reference count is not decreased and therefore memory for the 'struct pid' cannot be freed. This commit fixes this issue by decreasing the reference counts when 'target_ids' is written. Link: https://lkml.kernel.org/r/20211229124029.23348-1-sj@kernel.org Fixes: 4bc05954d007 ("mm/damon: implement a debugfs-based user space interface") Signed-off-by: SeongJae Park <sj@kernel.org> Cc: <stable@vger.kernel.org> [5.15+] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit ebb3f994dd92f8fb4d70c7541091216c1e10cb71) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: I1d280e32acf9478f48c6946469da1444a2998464 |
||
|
c3939031fb |
UPSTREAM: mm/damon/dbgfs: protect targets destructions with kdamond_lock
DAMON debugfs interface iterates current monitoring targets in 'dbgfs_target_ids_read()' while holding the corresponding 'kdamond_lock'. However, it also destructs the monitoring targets in 'dbgfs_before_terminate()' without holding the lock. This can result in a use_after_free bug. This commit avoids the race by protecting the destruction with the corresponding 'kdamond_lock'. Link: https://lkml.kernel.org/r/20211221094447.2241-1-sj@kernel.org Reported-by: Sangwoo Bae <sangwoob@amazon.com> Fixes: 4bc05954d007 ("mm/damon: implement a debugfs-based user space interface") Signed-off-by: SeongJae Park <sj@kernel.org> Cc: <stable@vger.kernel.org> [5.15.x] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit 34796417964b8d0aef45a99cf6c2d20cebe33733) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: I27e10c0e1ccc6c28c5a948a246e45db7a0338bed |
||
|
82bb332bf0 |
UPSTREAM: mm/damon/vaddr-test: remove unnecessary variables
A couple of test functions in DAMON virtual address space monitoring primitives implementation has unnecessary damon_ctx variables. This commit removes those. Link: https://lkml.kernel.org/r/20211201150440.1088-7-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Cc: Brendan Higgins <brendanhiggins@google.com> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit 9f86d624292c238203b3687cdb870a2cde1a6f9b) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: Ic7543d67d15843d7c2110302de950958a3b46e04 |
||
|
4f0e48e5e9 |
UPSTREAM: mm/damon/vaddr-test: split a test function having >1024 bytes frame size
On some configuration[1], 'damon_test_split_evenly()' kunit test function has >1024 bytes frame size, so below build warning is triggered: CC mm/damon/vaddr.o In file included from mm/damon/vaddr.c:672: mm/damon/vaddr-test.h: In function 'damon_test_split_evenly': mm/damon/vaddr-test.h:309:1: warning: the frame size of 1064 bytes is larger than 1024 bytes [-Wframe-larger-than=] 309 | } | ^ This commit fixes the warning by separating the common logic in the function. [1] https://lore.kernel.org/linux-mm/202111182146.OV3C4uGr-lkp@intel.com/ Link: https://lkml.kernel.org/r/20211201150440.1088-6-sj@kernel.org Fixes: 17ccae8bb5c9 ("mm/damon: add kunit tests") Signed-off-by: SeongJae Park <sj@kernel.org> Reported-by: kernel test robot <lkp@intel.com> Cc: Brendan Higgins <brendanhiggins@google.com> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit 044cd9750fe010170f5dc812e4824d98f5ea928c) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: I78226fdde7f992f5aa8209f0996561a3f7efce84 |
||
|
90af7e344b |
UPSTREAM: mm/damon/vaddr: remove an unnecessary warning message
The DAMON virtual address space monitoring primitive prints a warning message for wrong DAMOS action. However, it is not essential as the code returns appropriate failure in the case. This commit removes the message to make the log clean. Link: https://lkml.kernel.org/r/20211201150440.1088-5-sj@kernel.org Fixes: 6dea8add4d28 ("mm/damon/vaddr: support DAMON-based Operation Schemes") Signed-off-by: SeongJae Park <sj@kernel.org> Reviewed-by: Muchun Song <songmuchun@bytedance.com> Cc: Brendan Higgins <brendanhiggins@google.com> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit 09e12289cc044afa484e70c0b379d579d52caf9a) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: I695d3e813f9449b388f2757c6e81cba76ee3e1bf |
||
|
4e19846848 |
UPSTREAM: mm/damon/core: remove unnecessary error messages
DAMON core prints error messages when damon_target object creation is failed or wrong monitoring attributes are given. Because appropriate error code is returned for each case, the messages are not essential. Also, because the code path can be triggered with user-specified input, this could result in kernel log mistakenly being messy. To avoid the case, this commit removes the messages. Link: https://lkml.kernel.org/r/20211201150440.1088-4-sj@kernel.org Fixes: 4bc05954d007 ("mm/damon: implement a debugfs-based user space interface") Fixes: b9a6ac4e4ede ("mm/damon: adaptively adjust regions") Signed-off-by: SeongJae Park <sj@kernel.org> Cc: Brendan Higgins <brendanhiggins@google.com> Cc: kernel test robot <lkp@intel.com> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit 1afaf5cb687de85c5e00ac70f6eea5597077cbc5) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: I571336c5d49998029d4727b523b7a0950c753b2f |
||
|
a7969dac5a |
UPSTREAM: mm/damon/dbgfs: remove an unnecessary error message
When wrong scheme action is requested via the debugfs interface, DAMON prints an error message. Because the function returns error code, this is not really needed. Because the code path is triggered by the user specified input, this can result in kernel log mistakenly being messy. To avoid the case, this commit removes the message. Link: https://lkml.kernel.org/r/20211201150440.1088-3-sj@kernel.org Fixes: af122dd8f3c0 ("mm/damon/dbgfs: support DAMON-based Operation Schemes") Signed-off-by: SeongJae Park <sj@kernel.org> Cc: Brendan Higgins <brendanhiggins@google.com> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit 0bceffa236af401f5206feaf3538526cbc427209) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: I6c6e4ea6891eee04cb934f237b7d1768a766f240 |
||
|
f37ab7f595 |
UPSTREAM: mm/damon/core: use better timer mechanisms selection threshold
Patch series "mm/damon: Trivial fixups and improvements". This patchset contains trivial fixups and improvements for DAMON and its kunit/kselftest tests. This patch (of 11): DAMON is using hrtimer if requested sleep time is <=100ms, while the suggested threshold[1] is <=20ms. This commit applies the threshold. [1] Documentation/timers/timers-howto.rst Link: https://lkml.kernel.org/r/20211201150440.1088-2-sj@kernel.org Fixes: ee801b7dd7822 ("mm/damon/schemes: activate schemes based on a watermarks mechanism") Signed-off-by: SeongJae Park <sj@kernel.org> Cc: Shuah Khan <shuah@kernel.org> Cc: Brendan Higgins <brendanhiggins@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit 4de46a30b9929d3d1b29e481d48e9c25f8ac7919) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: Ieb5e3e196c96d8d54c83fecec53fdd13db763b62 |
||
|
63e8bc85e6 |
UPSTREAM: mm/damon/core: fix fake load reports due to uninterruptible sleeps
Because DAMON sleeps in uninterruptible mode, /proc/loadavg reports fake load while DAMON is turned on, though it is doing nothing. This can confuse users[1]. To avoid the case, this commit makes DAMON sleeps in idle mode. [1] https://lore.kernel.org/all/11868371.O9o76ZdvQC@natalenko.name/ Link: https://lkml.kernel.org/r/20211126145015.15862-3-sj@kernel.org Fixes: 2224d8485492 ("mm: introduce Data Access MONitor (DAMON)") Reported-by: Oleksandr Natalenko <oleksandr@natalenko.name> Signed-off-by: SeongJae Park <sj@kernel.org> Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name> Cc: John Stultz <john.stultz@linaro.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit 70e9274805fccfd175d0431a947bfd11ee7df40e) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: Id3518e85d9b1db9f71b62932418993b4b9666326 |
||
|
2581464867 |
UPSTREAM: mm/damon/dbgfs: fix missed use of damon_dbgfs_lock
DAMON debugfs is supposed to protect dbgfs_ctxs, dbgfs_nr_ctxs, and dbgfs_dirs using damon_dbgfs_lock. However, some of the code is accessing the variables without the protection. This fixes it by protecting all such accesses. Link: https://lkml.kernel.org/r/20211110145758.16558-3-sj@kernel.org Fixes: 75c1c2b53c78 ("mm/damon/dbgfs: support multiple contexts") Signed-off-by: SeongJae Park <sj@kernel.org> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit d78f3853f831eee46c6dbe726debf3be9e9c0d05) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: Ibdfcc75f9f219b69a4b4e6161af257c1d0eba891 |
||
|
dbbff9155c |
UPSTREAM: mm/damon/dbgfs: use '__GFP_NOWARN' for user-specified size buffer allocation
Patch series "DAMON fixes". This patch (of 2): DAMON users can trigger below warning in '__alloc_pages()' by invoking write() to some DAMON debugfs files with arbitrarily high count argument, because DAMON debugfs interface allocates some buffers based on the user-specified 'count'. if (unlikely(order >= MAX_ORDER)) { WARN_ON_ONCE(!(gfp & __GFP_NOWARN)); return NULL; } Because the DAMON debugfs interface code checks failure of the 'kmalloc()', this commit simply suppresses the warnings by adding '__GFP_NOWARN' flag. Link: https://lkml.kernel.org/r/20211110145758.16558-1-sj@kernel.org Link: https://lkml.kernel.org/r/20211110145758.16558-2-sj@kernel.org Fixes: 4bc05954d007 ("mm/damon: implement a debugfs-based user space interface") Signed-off-by: SeongJae Park <sj@kernel.org> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit db7a347b26fe05d2e8c115bb24dfd908d0252bc3) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: Ie04cc634d998260e5791b4daa4215b83a6af9071 |
||
|
55a2d2f5a7 |
UPSTREAM: mm/damon: remove return value from before_terminate callback
Since the return value of 'before_terminate' callback is never used, we make it have no return value. Link: https://lkml.kernel.org/r/20211029005023.8895-1-changbin.du@gmail.com Signed-off-by: Changbin Du <changbin.du@gmail.com> Reviewed-by: SeongJae Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit 658f9ae761b5965893727dd4edcdad56e5a439bb) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: Ida44623827a7a667118a2af329f6e58a57941fc9 |
||
|
b48f28f49c |
UPSTREAM: mm/damon: fix a few spelling mistakes in comments and a pr_debug message
There are a few spelling mistakes in the code. Fix these. Link: https://lkml.kernel.org/r/20211028184157.614544-1-colin.i.king@gmail.com Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Reviewed-by: SeongJae Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit 0107865541961ee128149c9873996d32143a74d0) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: I09c9421b1abeed6c002cf5fef07d229cf0f22ebd |
||
|
bb15a07842 |
UPSTREAM: mm/damon: simplify stop mechanism
A kernel thread can exit gracefully with kthread_stop(). So we don't need a new flag 'kdamond_stop'. And to make sure the task struct is not freed when accessing it, get reference to it before termination. Link: https://lkml.kernel.org/r/20211027130517.4404-1-changbin.du@gmail.com Signed-off-by: Changbin Du <changbin.du@gmail.com> Reviewed-by: SeongJae Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit 0f91d13366a402420bf98eaaf393db03946c13e0) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: I7b959fc6cd114dc244c895cf19b9fd864b81cd12 |
||
|
f1456aa48d |
UPSTREAM: mm/damon/dbgfs: add adaptive_targets list check before enable monitor_on
When the ctx->adaptive_targets list is empty, I did some test on monitor_on interface like this. # cat /sys/kernel/debug/damon/target_ids # # echo on > /sys/kernel/debug/damon/monitor_on # damon: kdamond (5390) starts Though the ctx->adaptive_targets list is empty, but the kthread_run still be called, and the kdamond.x thread still be created, this is meaningless. So there adds a judgment in 'dbgfs_monitor_on_write', if the ctx->adaptive_targets list is empty, return -EINVAL. Link: https://lkml.kernel.org/r/0a60a6e8ec9d71989e0848a4dc3311996ca3b5d4.1634720326.git.xhao@linux.alibaba.com Signed-off-by: Xin Hao <xhao@linux.alibaba.com> Reviewed-by: SeongJae Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit b5ca3e83ddb05342b1b30700b999cb9b107511f6) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: I768592c5fded26ead98ba94a46d43fd64118f589 |
||
|
8c2db14f3f |
UPSTREAM: mm/damon: remove unnecessary variable initialization
Patch series "mm/damon: Fix some small bugs", v4. This patch (of 2): In 'damon_va_apply_three_regions' there is no need to set variable 'i' to zero. Link: https://lkml.kernel.org/r/b7df8d3dad0943a37e01f60c441b1968b2b20354.1634720326.git.xhao@linux.alibaba.com Link: https://lkml.kernel.org/r/cover.1634720326.git.xhao@linux.alibaba.com Signed-off-by: Xin Hao <xhao@linux.alibaba.com> Reviewed-by: SeongJae Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit a460a36034bad4403c2c62e04a521bc6987ae5db) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: I81c05842e2372f3ab7a3d74df5358fbfb1c96342 |
||
|
4d321b786f |
UPSTREAM: mm/damon: introduce DAMON-based Reclamation (DAMON_RECLAIM)
This implements a new kernel subsystem that finds cold memory regions using DAMON and reclaims those immediately. It is intended to be used as proactive lightweigh reclamation logic for light memory pressure. For heavy memory pressure, it could be inactivated and fall back to the traditional page-scanning based reclamation. It's implemented on top of DAMON framework to use the DAMON-based Operation Schemes (DAMOS) feature. It utilizes all the DAMOS features including speed limit, prioritization, and watermarks. It could be enabled and tuned in boot time via the kernel boot parameter, and in run time via its module parameters ('/sys/module/damon_reclaim/parameters/') interface. [yangyingliang@huawei.com: fix error return code in damon_reclaim_turn()] Link: https://lkml.kernel.org/r/20211025124500.2758060-1-yangyingliang@huawei.com Link: https://lkml.kernel.org/r/20211019150731.16699-15-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Cc: Amit Shah <amit@kernel.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: David Hildenbrand <david@redhat.com> Cc: David Rientjes <rientjes@google.com> Cc: David Woodhouse <dwmw@amazon.com> Cc: Greg Thelen <gthelen@google.com> Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Leonard Foerster <foersleo@amazon.de> Cc: Marco Elver <elver@google.com> Cc: Markus Boehme <markubo@amazon.de> Cc: Shakeel Butt <shakeelb@google.com> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit 43b0536cb4710e7bb591edfda7e68a1c327a3409) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: Id57795ee37e5db046f782d2bffcd0533fe476558 |
||
|
88d44101df |
UPSTREAM: mm/damon/dbgfs: support watermarks
This updates DAMON debugfs interface to support the watermarks based schemes activation. For this, now 'schemes' file receives five more values. Link: https://lkml.kernel.org/r/20211019150731.16699-13-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Cc: Amit Shah <amit@kernel.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: David Hildenbrand <david@redhat.com> Cc: David Rientjes <rientjes@google.com> Cc: David Woodhouse <dwmw@amazon.com> Cc: Greg Thelen <gthelen@google.com> Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Leonard Foerster <foersleo@amazon.de> Cc: Marco Elver <elver@google.com> Cc: Markus Boehme <markubo@amazon.de> Cc: Shakeel Butt <shakeelb@google.com> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit ae666a6dddfd119da55cc1bad54f7cbd8b2ef54c) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: I9b1b7c285ea04bd4dc9beefcc6a4e5368f093745 |
||
|
fb7d5f3b1a |
UPSTREAM: mm/damon/schemes: activate schemes based on a watermarks mechanism
DAMON-based operation schemes need to be manually turned on and off. In some use cases, however, the condition for turning a scheme on and off would depend on the system's situation. For example, schemes for proactive pages reclamation would need to be turned on when some memory pressure is detected, and turned off when the system has enough free memory. For easier control of schemes activation based on the system situation, this introduces a watermarks-based mechanism. The client can describe the watermark metric (e.g., amount of free memory in the system), watermark check interval, and three watermarks, namely high, mid, and low. If the scheme is deactivated, it only gets the metric and compare that to the three watermarks for every check interval. If the metric is higher than the high watermark, the scheme is deactivated. If the metric is between the mid watermark and the low watermark, the scheme is activated. If the metric is lower than the low watermark, the scheme is deactivated again. This is to allow users fall back to traditional page-granularity mechanisms. Link: https://lkml.kernel.org/r/20211019150731.16699-12-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Cc: Amit Shah <amit@kernel.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: David Hildenbrand <david@redhat.com> Cc: David Rientjes <rientjes@google.com> Cc: David Woodhouse <dwmw@amazon.com> Cc: Greg Thelen <gthelen@google.com> Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Leonard Foerster <foersleo@amazon.de> Cc: Marco Elver <elver@google.com> Cc: Markus Boehme <markubo@amazon.de> Cc: Shakeel Butt <shakeelb@google.com> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit ee801b7dd7822a82fd7663048ad649545fac6df3) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: I857d0aeab8aa58929ea71c8e9d42b3b93966fc51 |
||
|
eb9cf87aa8 |
UPSTREAM: mm/damon/dbgfs: support prioritization weights
This allows DAMON debugfs interface users set the prioritization weights by putting three more numbers to the 'schemes' file. Link: https://lkml.kernel.org/r/20211019150731.16699-10-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Cc: Amit Shah <amit@kernel.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: David Hildenbrand <david@redhat.com> Cc: David Rientjes <rientjes@google.com> Cc: David Woodhouse <dwmw@amazon.com> Cc: Greg Thelen <gthelen@google.com> Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Leonard Foerster <foersleo@amazon.de> Cc: Marco Elver <elver@google.com> Cc: Markus Boehme <markubo@amazon.de> Cc: Shakeel Butt <shakeelb@google.com> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit f4a68b4a04e6db9397f7776c51d0f9715bd1a60e) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: Ia47dfebe9817da3e0d669ea996c0d3b44f980936 |
||
|
798e889699 |
UPSTREAM: mm/damon/vaddr,paddr: support pageout prioritization
This makes the default monitoring primitives for virtual address spaces and the physical address sapce to support memory regions prioritization for 'PAGEOUT' DAMOS action. It calculates hotness of each region as weighted sum of 'nr_accesses' and 'age' of the region and get the priority score as reverse of the hotness, so that cold regions can be paged out first. Link: https://lkml.kernel.org/r/20211019150731.16699-9-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Cc: Amit Shah <amit@kernel.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: David Hildenbrand <david@redhat.com> Cc: David Rientjes <rientjes@google.com> Cc: David Woodhouse <dwmw@amazon.com> Cc: Greg Thelen <gthelen@google.com> Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Leonard Foerster <foersleo@amazon.de> Cc: Marco Elver <elver@google.com> Cc: Markus Boehme <markubo@amazon.de> Cc: Shakeel Butt <shakeelb@google.com> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit 198f0f4c58b9f481e4e51c8c70a6ab9852bbab7f) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: I5f8f8d5e3b0669ec48fa6d698b963091c892106d |
||
|
dd1947047e |
UPSTREAM: mm/damon/schemes: prioritize regions within the quotas
This makes DAMON apply schemes to regions having higher priority first, if it cannot apply schemes to all regions due to the quotas. The prioritization function should be implemented in the monitoring primitives. Those would commonly calculate the priority of the region using attributes of regions, namely 'size', 'nr_accesses', and 'age'. For example, some primitive would calculate the priority of each region using a weighted sum of 'nr_accesses' and 'age' of the region. The optimal weights would depend on give environments, so this makes those customizable. Nevertheless, the score calculation functions are only encouraged to respect the weights, not mandated. Link: https://lkml.kernel.org/r/20211019150731.16699-8-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Cc: Amit Shah <amit@kernel.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: David Hildenbrand <david@redhat.com> Cc: David Rientjes <rientjes@google.com> Cc: David Woodhouse <dwmw@amazon.com> Cc: Greg Thelen <gthelen@google.com> Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Leonard Foerster <foersleo@amazon.de> Cc: Marco Elver <elver@google.com> Cc: Markus Boehme <markubo@amazon.de> Cc: Shakeel Butt <shakeelb@google.com> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit 38683e003153f7abfa612d7b7fe147efa4624af2) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: I7c96b116f7daf1d33df427b023aba3664951e2cb |
||
|
8c491daa0f |
UPSTREAM: mm/damon/dbgfs: support quotas of schemes
This makes the debugfs interface of DAMON support the scheme quotas by chaning the format of the input for the schemes file. Link: https://lkml.kernel.org/r/20211019150731.16699-6-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Cc: Amit Shah <amit@kernel.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: David Hildenbrand <david@redhat.com> Cc: David Rientjes <rientjes@google.com> Cc: David Woodhouse <dwmw@amazon.com> Cc: Greg Thelen <gthelen@google.com> Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Leonard Foerster <foersleo@amazon.de> Cc: Marco Elver <elver@google.com> Cc: Markus Boehme <markubo@amazon.de> Cc: Shakeel Butt <shakeelb@google.com> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit d7d0ec85e983945079364db3c3d2d80cc795a48c) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: I2260814672b0b9db7f0b416505bfa767fa0fa00b |
||
|
2c090a6bc6 |
UPSTREAM: mm/damon/schemes: implement time quota
The size quota feature of DAMOS is useful for IO resource-critical systems, but not so intuitive for CPU time-critical systems. Systems using zram or zswap-like swap device would be examples. To provide another intuitive ways for such systems, this implements time-based quota for DAMON-based Operation Schemes. If the quota is set, DAMOS tries to use only up to the user-defined quota of CPU time within a given time window. Link: https://lkml.kernel.org/r/20211019150731.16699-5-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Cc: Amit Shah <amit@kernel.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: David Hildenbrand <david@redhat.com> Cc: David Rientjes <rientjes@google.com> Cc: David Woodhouse <dwmw@amazon.com> Cc: Greg Thelen <gthelen@google.com> Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Leonard Foerster <foersleo@amazon.de> Cc: Marco Elver <elver@google.com> Cc: Markus Boehme <markubo@amazon.de> Cc: Shakeel Butt <shakeelb@google.com> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit 1cd2430300594a230dba9178ac9e286d868d9da2) Bug: 228223814 Signed-off-by: Hailong Tu <tuhailong@oppo.com> Change-Id: I5ee77a0882cb67d76f7f24ce7742414718ba028c |