Skip to content

Commit b4f0dd3

Browse files
committed
Merge tag 'mm-hotfixes-stable-2026-03-09-16-36' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull misc fixes from Andrew Morton: "15 hotfixes. 6 are cc:stable. 14 are for MM. Singletons, with one doubleton - please see the changelogs for details" * tag 'mm-hotfixes-stable-2026-03-09-16-36' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: MAINTAINERS, mailmap: update email address for Lorenzo Stoakes mm/mmu_notifier: clean up mmu_notifier.h kernel-doc uaccess: correct kernel-doc parameter format mm/huge_memory: fix a folio_split() race condition with folio_try_get() MAINTAINERS: add co-maintainer and reviewer for SLAB ALLOCATOR MAINTAINERS: add RELAY entry memcg: fix slab accounting in refill_obj_stock() trylock path mm/hugetlb.c: use __pa() instead of virt_to_phys() in early bootmem alloc code zram: rename writeback_compressed device attr tools/testing: fix testing/vma and testing/radix-tree build Revert "ptdesc: remove references to folios from __pagetable_ctor() and pagetable_dtor()" mm/cma: move put_page_testzero() out of VM_WARN_ON in cma_release() mm/damon/core: clear walk_control on inactive context in damos_walk() mm: memfd_luo: always dirty all folios mm: memfd_luo: always make all folios uptodate
2 parents 1f318b9 + b12bbe3 commit b4f0dd3

18 files changed

Lines changed: 163 additions & 73 deletions

File tree

.mailmap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,8 @@ Lior David <[email protected]> <[email protected]>
498498
499499
500500
501-
501+
502+
502503
503504
504505

Documentation/ABI/testing/sysfs-block-zram

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,11 @@ Description:
151151
The algorithm_params file is write-only and is used to setup
152152
compression algorithm parameters.
153153

154-
What: /sys/block/zram<id>/writeback_compressed
154+
What: /sys/block/zram<id>/compressed_writeback
155155
Date: Decemeber 2025
156156
Contact: Richard Chang <[email protected]>
157157
Description:
158-
The writeback_compressed device atrribute toggles compressed
158+
The compressed_writeback device atrribute toggles compressed
159159
writeback feature.
160160

161161
What: /sys/block/zram<id>/writeback_batch_size

Documentation/admin-guide/blockdev/zram.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ writeback_limit WO specifies the maximum amount of write IO zram
216216
writeback_limit_enable RW show and set writeback_limit feature
217217
writeback_batch_size RW show and set maximum number of in-flight
218218
writeback operations
219-
writeback_compressed RW show and set compressed writeback feature
219+
compressed_writeback RW show and set compressed writeback feature
220220
comp_algorithm RW show and change the compression algorithm
221221
algorithm_params WO setup compression algorithm parameters
222222
compact WO trigger memory compaction
@@ -439,11 +439,11 @@ budget in next setting is user's job.
439439
By default zram stores written back pages in decompressed (raw) form, which
440440
means that writeback operation involves decompression of the page before
441441
writing it to the backing device. This behavior can be changed by enabling
442-
`writeback_compressed` feature, which causes zram to write compressed pages
442+
`compressed_writeback` feature, which causes zram to write compressed pages
443443
to the backing device, thus avoiding decompression overhead. To enable
444444
this feature, execute::
445445

446-
$ echo yes > /sys/block/zramX/writeback_compressed
446+
$ echo yes > /sys/block/zramX/compressed_writeback
447447

448448
Note that this feature should be configured before the `zramX` device is
449449
initialized.

MAINTAINERS

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16643,7 +16643,7 @@ F: mm/balloon.c
1664316643
MEMORY MANAGEMENT - CORE
1664416644
M: Andrew Morton <[email protected]>
1664516645
M: David Hildenbrand <[email protected]>
16646-
R: Lorenzo Stoakes <[email protected]>
16646+
R: Lorenzo Stoakes <[email protected]>
1664716647
R: Liam R. Howlett <[email protected]>
1664816648
R: Vlastimil Babka <[email protected]>
1664916649
R: Mike Rapoport <[email protected]>
@@ -16773,7 +16773,7 @@ F: mm/workingset.c
1677316773
MEMORY MANAGEMENT - MISC
1677416774
M: Andrew Morton <[email protected]>
1677516775
M: David Hildenbrand <[email protected]>
16776-
R: Lorenzo Stoakes <[email protected]>
16776+
R: Lorenzo Stoakes <[email protected]>
1677716777
R: Liam R. Howlett <[email protected]>
1677816778
R: Vlastimil Babka <[email protected]>
1677916779
R: Mike Rapoport <[email protected]>
@@ -16864,7 +16864,7 @@ R: David Hildenbrand <[email protected]>
1686416864
R: Michal Hocko <[email protected]>
1686516865
R: Qi Zheng <[email protected]>
1686616866
R: Shakeel Butt <[email protected]>
16867-
R: Lorenzo Stoakes <[email protected]>
16867+
R: Lorenzo Stoakes <[email protected]>
1686816868
1686916869
S: Maintained
1687016870
F: mm/vmscan.c
@@ -16873,7 +16873,7 @@ F: mm/workingset.c
1687316873
MEMORY MANAGEMENT - RMAP (REVERSE MAPPING)
1687416874
M: Andrew Morton <[email protected]>
1687516875
M: David Hildenbrand <[email protected]>
16876-
M: Lorenzo Stoakes <[email protected]>
16876+
M: Lorenzo Stoakes <[email protected]>
1687716877
R: Rik van Riel <[email protected]>
1687816878
R: Liam R. Howlett <[email protected]>
1687916879
R: Vlastimil Babka <[email protected]>
@@ -16918,7 +16918,7 @@ F: mm/swapfile.c
1691816918
MEMORY MANAGEMENT - THP (TRANSPARENT HUGE PAGE)
1691916919
M: Andrew Morton <[email protected]>
1692016920
M: David Hildenbrand <[email protected]>
16921-
M: Lorenzo Stoakes <[email protected]>
16921+
M: Lorenzo Stoakes <[email protected]>
1692216922
R: Zi Yan <[email protected]>
1692316923
R: Baolin Wang <[email protected]>
1692416924
R: Liam R. Howlett <[email protected]>
@@ -16958,7 +16958,7 @@ F: tools/testing/selftests/mm/uffd-*.[ch]
1695816958

1695916959
MEMORY MANAGEMENT - RUST
1696016960
M: Alice Ryhl <[email protected]>
16961-
R: Lorenzo Stoakes <[email protected]>
16961+
R: Lorenzo Stoakes <[email protected]>
1696216962
R: Liam R. Howlett <[email protected]>
1696316963
1696416964
@@ -16974,7 +16974,7 @@ F: rust/kernel/page.rs
1697416974
MEMORY MAPPING
1697516975
M: Andrew Morton <[email protected]>
1697616976
M: Liam R. Howlett <[email protected]>
16977-
M: Lorenzo Stoakes <[email protected]>
16977+
M: Lorenzo Stoakes <[email protected]>
1697816978
R: Vlastimil Babka <[email protected]>
1697916979
R: Jann Horn <[email protected]>
1698016980
R: Pedro Falcato <[email protected]>
@@ -17004,7 +17004,7 @@ MEMORY MAPPING - LOCKING
1700417004
M: Andrew Morton <[email protected]>
1700517005
M: Suren Baghdasaryan <[email protected]>
1700617006
M: Liam R. Howlett <[email protected]>
17007-
M: Lorenzo Stoakes <[email protected]>
17007+
M: Lorenzo Stoakes <[email protected]>
1700817008
R: Vlastimil Babka <[email protected]>
1700917009
R: Shakeel Butt <[email protected]>
1701017010
@@ -17019,7 +17019,7 @@ F: mm/mmap_lock.c
1701917019
MEMORY MAPPING - MADVISE (MEMORY ADVICE)
1702017020
M: Andrew Morton <[email protected]>
1702117021
M: Liam R. Howlett <[email protected]>
17022-
M: Lorenzo Stoakes <[email protected]>
17022+
M: Lorenzo Stoakes <[email protected]>
1702317023
M: David Hildenbrand <[email protected]>
1702417024
R: Vlastimil Babka <[email protected]>
1702517025
R: Jann Horn <[email protected]>
@@ -22267,6 +22267,16 @@ L: [email protected]
2226722267
S: Orphan
2226822268
F: drivers/net/wireless/rsi/
2226922269

22270+
RELAY
22271+
M: Andrew Morton <[email protected]>
22272+
M: Jens Axboe <[email protected]>
22273+
M: Jason Xing <[email protected]>
22274+
22275+
S: Maintained
22276+
F: Documentation/filesystems/relay.rst
22277+
F: include/linux/relay.h
22278+
F: kernel/relay.c
22279+
2227022280
REGISTER MAP ABSTRACTION
2227122281
M: Mark Brown <[email protected]>
2227222282
@@ -23156,7 +23166,7 @@ K: \b(?i:rust)\b
2315623166

2315723167
RUST [ALLOC]
2315823168
M: Danilo Krummrich <[email protected]>
23159-
R: Lorenzo Stoakes <[email protected]>
23169+
R: Lorenzo Stoakes <[email protected]>
2316023170
R: Vlastimil Babka <[email protected]>
2316123171
R: Liam R. Howlett <[email protected]>
2316223172
R: Uladzislau Rezki <[email protected]>
@@ -24333,11 +24343,12 @@ F: drivers/nvmem/layouts/sl28vpd.c
2433324343

2433424344
SLAB ALLOCATOR
2433524345
M: Vlastimil Babka <[email protected]>
24346+
M: Harry Yoo <[email protected]>
2433624347
M: Andrew Morton <[email protected]>
24348+
R: Hao Li <[email protected]>
2433724349
R: Christoph Lameter <[email protected]>
2433824350
R: David Rientjes <[email protected]>
2433924351
R: Roman Gushchin <[email protected]>
24340-
R: Harry Yoo <[email protected]>
2434124352
2434224353
S: Maintained
2434324354
T: git git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git

drivers/block/zram/zram_drv.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ static ssize_t bd_stat_show(struct device *dev, struct device_attribute *attr,
549549
return ret;
550550
}
551551

552-
static ssize_t writeback_compressed_store(struct device *dev,
552+
static ssize_t compressed_writeback_store(struct device *dev,
553553
struct device_attribute *attr,
554554
const char *buf, size_t len)
555555
{
@@ -564,20 +564,20 @@ static ssize_t writeback_compressed_store(struct device *dev,
564564
return -EBUSY;
565565
}
566566

567-
zram->wb_compressed = val;
567+
zram->compressed_wb = val;
568568

569569
return len;
570570
}
571571

572-
static ssize_t writeback_compressed_show(struct device *dev,
572+
static ssize_t compressed_writeback_show(struct device *dev,
573573
struct device_attribute *attr,
574574
char *buf)
575575
{
576576
bool val;
577577
struct zram *zram = dev_to_zram(dev);
578578

579579
guard(rwsem_read)(&zram->dev_lock);
580-
val = zram->wb_compressed;
580+
val = zram->compressed_wb;
581581

582582
return sysfs_emit(buf, "%d\n", val);
583583
}
@@ -946,7 +946,7 @@ static int zram_writeback_complete(struct zram *zram, struct zram_wb_req *req)
946946
goto out;
947947
}
948948

949-
if (zram->wb_compressed) {
949+
if (zram->compressed_wb) {
950950
/*
951951
* ZRAM_WB slots get freed, we need to preserve data required
952952
* for read decompression.
@@ -960,7 +960,7 @@ static int zram_writeback_complete(struct zram *zram, struct zram_wb_req *req)
960960
set_slot_flag(zram, index, ZRAM_WB);
961961
set_slot_handle(zram, index, req->blk_idx);
962962

963-
if (zram->wb_compressed) {
963+
if (zram->compressed_wb) {
964964
if (huge)
965965
set_slot_flag(zram, index, ZRAM_HUGE);
966966
set_slot_size(zram, index, size);
@@ -1100,7 +1100,7 @@ static int zram_writeback_slots(struct zram *zram,
11001100
*/
11011101
if (!test_slot_flag(zram, index, ZRAM_PP_SLOT))
11021102
goto next;
1103-
if (zram->wb_compressed)
1103+
if (zram->compressed_wb)
11041104
err = read_from_zspool_raw(zram, req->page, index);
11051105
else
11061106
err = read_from_zspool(zram, req->page, index);
@@ -1429,7 +1429,7 @@ static void zram_async_read_endio(struct bio *bio)
14291429
*
14301430
* Keep the existing behavior for now.
14311431
*/
1432-
if (zram->wb_compressed == false) {
1432+
if (zram->compressed_wb == false) {
14331433
/* No decompression needed, complete the parent IO */
14341434
bio_endio(req->parent);
14351435
bio_put(bio);
@@ -1508,7 +1508,7 @@ static int read_from_bdev_sync(struct zram *zram, struct page *page, u32 index,
15081508
flush_work(&req.work);
15091509
destroy_work_on_stack(&req.work);
15101510

1511-
if (req.error || zram->wb_compressed == false)
1511+
if (req.error || zram->compressed_wb == false)
15121512
return req.error;
15131513

15141514
return decompress_bdev_page(zram, page, index);
@@ -3007,7 +3007,7 @@ static DEVICE_ATTR_WO(writeback);
30073007
static DEVICE_ATTR_RW(writeback_limit);
30083008
static DEVICE_ATTR_RW(writeback_limit_enable);
30093009
static DEVICE_ATTR_RW(writeback_batch_size);
3010-
static DEVICE_ATTR_RW(writeback_compressed);
3010+
static DEVICE_ATTR_RW(compressed_writeback);
30113011
#endif
30123012
#ifdef CONFIG_ZRAM_MULTI_COMP
30133013
static DEVICE_ATTR_RW(recomp_algorithm);
@@ -3031,7 +3031,7 @@ static struct attribute *zram_disk_attrs[] = {
30313031
&dev_attr_writeback_limit.attr,
30323032
&dev_attr_writeback_limit_enable.attr,
30333033
&dev_attr_writeback_batch_size.attr,
3034-
&dev_attr_writeback_compressed.attr,
3034+
&dev_attr_compressed_writeback.attr,
30353035
#endif
30363036
&dev_attr_io_stat.attr,
30373037
&dev_attr_mm_stat.attr,
@@ -3091,7 +3091,7 @@ static int zram_add(void)
30913091
init_rwsem(&zram->dev_lock);
30923092
#ifdef CONFIG_ZRAM_WRITEBACK
30933093
zram->wb_batch_size = 32;
3094-
zram->wb_compressed = false;
3094+
zram->compressed_wb = false;
30953095
#endif
30963096

30973097
/* gendisk structure */

drivers/block/zram/zram_drv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ struct zram {
133133
#ifdef CONFIG_ZRAM_WRITEBACK
134134
struct file *backing_dev;
135135
bool wb_limit_enable;
136-
bool wb_compressed;
136+
bool compressed_wb;
137137
u32 wb_batch_size;
138138
u64 bd_wb_limit;
139139
struct block_device *bdev;

include/linux/mm.h

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3514,26 +3514,21 @@ static inline bool ptlock_init(struct ptdesc *ptdesc) { return true; }
35143514
static inline void ptlock_free(struct ptdesc *ptdesc) {}
35153515
#endif /* defined(CONFIG_SPLIT_PTE_PTLOCKS) */
35163516

3517-
static inline unsigned long ptdesc_nr_pages(const struct ptdesc *ptdesc)
3518-
{
3519-
return compound_nr(ptdesc_page(ptdesc));
3520-
}
3521-
35223517
static inline void __pagetable_ctor(struct ptdesc *ptdesc)
35233518
{
3524-
pg_data_t *pgdat = NODE_DATA(memdesc_nid(ptdesc->pt_flags));
3519+
struct folio *folio = ptdesc_folio(ptdesc);
35253520

3526-
__SetPageTable(ptdesc_page(ptdesc));
3527-
mod_node_page_state(pgdat, NR_PAGETABLE, ptdesc_nr_pages(ptdesc));
3521+
__folio_set_pgtable(folio);
3522+
lruvec_stat_add_folio(folio, NR_PAGETABLE);
35283523
}
35293524

35303525
static inline void pagetable_dtor(struct ptdesc *ptdesc)
35313526
{
3532-
pg_data_t *pgdat = NODE_DATA(memdesc_nid(ptdesc->pt_flags));
3527+
struct folio *folio = ptdesc_folio(ptdesc);
35333528

35343529
ptlock_free(ptdesc);
3535-
__ClearPageTable(ptdesc_page(ptdesc));
3536-
mod_node_page_state(pgdat, NR_PAGETABLE, -ptdesc_nr_pages(ptdesc));
3530+
__folio_clear_pgtable(folio);
3531+
lruvec_stat_sub_folio(folio, NR_PAGETABLE);
35373532
}
35383533

35393534
static inline void pagetable_dtor_free(struct ptdesc *ptdesc)

include/linux/mmu_notifier.h

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ struct mmu_notifier {
234234
};
235235

236236
/**
237-
* struct mmu_interval_notifier_ops
237+
* struct mmu_interval_notifier_ops - callback for range notification
238238
* @invalidate: Upon return the caller must stop using any SPTEs within this
239239
* range. This function can sleep. Return false only if sleeping
240240
* was required but mmu_notifier_range_blockable(range) is false.
@@ -309,8 +309,8 @@ void mmu_interval_notifier_remove(struct mmu_interval_notifier *interval_sub);
309309

310310
/**
311311
* mmu_interval_set_seq - Save the invalidation sequence
312-
* @interval_sub - The subscription passed to invalidate
313-
* @cur_seq - The cur_seq passed to the invalidate() callback
312+
* @interval_sub: The subscription passed to invalidate
313+
* @cur_seq: The cur_seq passed to the invalidate() callback
314314
*
315315
* This must be called unconditionally from the invalidate callback of a
316316
* struct mmu_interval_notifier_ops under the same lock that is used to call
@@ -329,16 +329,16 @@ mmu_interval_set_seq(struct mmu_interval_notifier *interval_sub,
329329

330330
/**
331331
* mmu_interval_read_retry - End a read side critical section against a VA range
332-
* interval_sub: The subscription
333-
* seq: The return of the paired mmu_interval_read_begin()
332+
* @interval_sub: The subscription
333+
* @seq: The return of the paired mmu_interval_read_begin()
334334
*
335335
* This MUST be called under a user provided lock that is also held
336336
* unconditionally by op->invalidate() when it calls mmu_interval_set_seq().
337337
*
338338
* Each call should be paired with a single mmu_interval_read_begin() and
339339
* should be used to conclude the read side.
340340
*
341-
* Returns true if an invalidation collided with this critical section, and
341+
* Returns: true if an invalidation collided with this critical section, and
342342
* the caller should retry.
343343
*/
344344
static inline bool
@@ -350,20 +350,21 @@ mmu_interval_read_retry(struct mmu_interval_notifier *interval_sub,
350350

351351
/**
352352
* mmu_interval_check_retry - Test if a collision has occurred
353-
* interval_sub: The subscription
354-
* seq: The return of the matching mmu_interval_read_begin()
353+
* @interval_sub: The subscription
354+
* @seq: The return of the matching mmu_interval_read_begin()
355355
*
356356
* This can be used in the critical section between mmu_interval_read_begin()
357-
* and mmu_interval_read_retry(). A return of true indicates an invalidation
358-
* has collided with this critical region and a future
359-
* mmu_interval_read_retry() will return true.
360-
*
361-
* False is not reliable and only suggests a collision may not have
362-
* occurred. It can be called many times and does not have to hold the user
363-
* provided lock.
357+
* and mmu_interval_read_retry().
364358
*
365359
* This call can be used as part of loops and other expensive operations to
366360
* expedite a retry.
361+
* It can be called many times and does not have to hold the user
362+
* provided lock.
363+
*
364+
* Returns: true indicates an invalidation has collided with this critical
365+
* region and a future mmu_interval_read_retry() will return true.
366+
* False is not reliable and only suggests a collision may not have
367+
* occurred.
367368
*/
368369
static inline bool
369370
mmu_interval_check_retry(struct mmu_interval_notifier *interval_sub,

0 commit comments

Comments
 (0)