Skip to contentSkip to conversation

iomap: remove set_memor_ro() on zero page

PATCH Applied Luis Chamberlain 5 participants 5 messages Aug 26, 2024 – Aug 27, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iomap: remove set_memor_ro() on zero page

Stephen reported a boot failure on ppc power8 system where set_memor_ro() on the new zero page failed [0]. Christophe Leroy further clarifies we can't use this on on linear memory on ppc, and so instead of special casing this just for PowerPC [2] remove the call as suggested by Darrick.

[0] https://lore.kernel.org/all/[email protected]/T/#u
[1] https://lore.kernel.org/all/[email protected]/
[2] https://lore.kernel.org/all/[email protected]/

---

This applies to the vfs.blocksize branch on the vfs tree.

 fs/iomap/direct-io.c | 3 ---
 1 file changed, 3 deletions(-)
fs/iomap/direct-io.c +0 -3
index c02b266bba52..f637aa0706a3 100644
@@ -11,7 +11,6 @@
 #include <linux/iomap.h>
 #include <linux/backing-dev.h>
 #include <linux/uio.h>
-#include <linux/set_memory.h>
 #include <linux/task_io_accounting_ops.h>
 #include "trace.h"
 
@@ -781,8 +780,6 @@ static int __init iomap_dio_init(void)
 	if (!zero_page)
 		return -ENOMEM;
 
-	set_memory_ro((unsigned long)page_address(zero_page),
-		      1U << IOMAP_ZERO_PAGE_ORDER);
 	return 0;
 }
 fs_initcall(iomap_dio_init);
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Luis Chamberlain

Stephen reported a boot failure on ppc power8 system where set_memor_ro() on the new zero page failed [0]. Christophe Leroy further clarifies we can't use this on on linear memory on ppc, and so instead of special casing this just for PowerPC [2] remove the call as suggested by Darrick.

I've already asked for it not to be added multiple times, but I'm glad we're getting there now:

Reviewed-by on v1 1/1
#2 lore raw
In reply to Luis Chamberlain
Quoted 6 lines · Luis Chamberlain

Stephen reported a boot failure on ppc power8 system where set_memor_ro() on the new zero page failed [0]. Christophe Leroy further clarifies we can't use this on on linear memory on ppc, and so instead of special casing this just for PowerPC [2] remove the call as suggested by Darrick.

Quoted 7 lines

[0] https://lore.kernel.org/all/[email protected]/T/#u
[1] https://lore.kernel.org/all/[email protected]/
[2] https://lore.kernel.org/all/[email protected]/

--D

Quoted 32 lines

---

This applies to the vfs.blocksize branch on the vfs tree.

 fs/iomap/direct-io.c | 3 ---
 1 file changed, 3 deletions(-)
fs/iomap/direct-io.c +0 -3
index c02b266bba52..f637aa0706a3 100644
@@ -11,7 +11,6 @@
 #include <linux/iomap.h>
 #include <linux/backing-dev.h>
 #include <linux/uio.h>
-#include <linux/set_memory.h>
 #include <linux/task_io_accounting_ops.h>
 #include "trace.h"
 
@@ -781,8 +780,6 @@ static int __init iomap_dio_init(void)
 	if (!zero_page)
 		return -ENOMEM;
 
-	set_memory_ro((unsigned long)page_address(zero_page),
-		      1U << IOMAP_ZERO_PAGE_ORDER);
 	return 0;
 }
 fs_initcall(iomap_dio_init);
Signature · 1 line
2.43.0
#3 lore raw

Hi all,

Quoted 12 lines · On Mon, 26 Aug 2024 22:55:39 -0700 "Darrick J. Wong" <[email protected]> wrote:
Quoted 10 lines · Luis Chamberlain

Stephen reported a boot failure on ppc power8 system where set_memor_ro() on the new zero page failed [0]. Christophe Leroy further clarifies we can't use this on on linear memory on ppc, and so instead of special casing this just for PowerPC [2] remove the call as suggested by Darrick.

[0] https://lore.kernel.org/all/[email protected]/T/#u
[1] https://lore.kernel.org/all/[email protected]/
[2] https://lore.kernel.org/all/[email protected]/

Quoted 5 lines
Quoted 3 lines

I added this to linux-next today, and it seems to have fixed the run time warning, so

Signature · 2 lines
Cheers,
Stephen Rothwell
maintainer Applied
#4 lore raw
In reply to Luis Chamberlain
Quoted 11 lines · Luis Chamberlain

Stephen reported a boot failure on ppc power8 system where set_memor_ro() on the new zero page failed [0]. Christophe Leroy further clarifies we can't use this on on linear memory on ppc, and so instead of special casing this just for PowerPC [2] remove the call as suggested by Darrick.

[0] https://lore.kernel.org/all/[email protected]/T/#u
[1] https://lore.kernel.org/all/[email protected]/
[2] https://lore.kernel.org/all/[email protected]/

[...]

Thank you for the quick fix!

---

Applied to the vfs.blocksize branch of the vfs/vfs.git tree. Patches in the vfs.blocksize branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.blocksize

[1/1] iomap: remove set_memor_ro() on zero page

      https://git.kernel.org/vfs/vfs/c/51eac77be01b