summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2022-12-22 21:20:17 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2022-12-22 21:20:17 +0100
commit06cc7bf916cd562bf23b3929ca607f66a20850f0 (patch)
tree1f1e832b43e0183dbb31974b93b28b2f61f79df7
parent448889a4f0c32ba8ea61f870d4edcb0e0d58af85 (diff)
Warn only once about not being able to recycle pages
-rw-r--r--ipc/mach_port.c2
-rw-r--r--linux/dev/glue/block.c5
-rw-r--r--linux/src/drivers/block/ide.c5
-rw-r--r--vm/vm_page.c10
4 files changed, 18 insertions, 4 deletions
diff --git a/ipc/mach_port.c b/ipc/mach_port.c
index db6e05dc..3b00f387 100644
--- a/ipc/mach_port.c
+++ b/ipc/mach_port.c
@@ -534,7 +534,7 @@ mach_port_allocate(
* KERN_INVALID_NAME The name doesn't denote a right.
*/
-static volatile boolean_t mach_port_deallocate_debug = FALSE;
+static volatile boolean_t mach_port_deallocate_debug = TRUE;
kern_return_t
mach_port_destroy(
diff --git a/linux/dev/glue/block.c b/linux/dev/glue/block.c
index 6730c5ec..950413df 100644
--- a/linux/dev/glue/block.c
+++ b/linux/dev/glue/block.c
@@ -207,7 +207,10 @@ int
blk_dev_init ()
{
#ifdef CONFIG_BLK_DEV_IDE
- ide_init ();
+ extern char *kernel_cmdline;
+ if (strncmp(kernel_cmdline, "noide", 5) &&
+ !strstr(kernel_cmdline, " noide"))
+ ide_init ();
#endif
#ifdef CONFIG_BLK_DEV_FD
floppy_init ();
diff --git a/linux/src/drivers/block/ide.c b/linux/src/drivers/block/ide.c
index 2d0fc77e..f3b78831 100644
--- a/linux/src/drivers/block/ide.c
+++ b/linux/src/drivers/block/ide.c
@@ -3725,7 +3725,10 @@ static void probe_for_hwifs (void)
#ifdef CONFIG_BLK_DEV_PROMISE
init_dc4030();
#endif
- ahci_probe_pci();
+ extern char *kernel_cmdline;
+ if (strncmp(kernel_cmdline, "noahci", 6) &&
+ !strstr(kernel_cmdline, " noahci"))
+ ahci_probe_pci();
}
static int hwif_init (int h)
diff --git a/vm/vm_page.c b/vm/vm_page.c
index 87185c15..707be4bb 100644
--- a/vm/vm_page.c
+++ b/vm/vm_page.c
@@ -2040,7 +2040,15 @@ again:
* TODO Find out what could cause this and how to deal with it.
* This will likely require an out-of-memory killer.
*/
- printf("vm_page warning: unable to recycle any page");
+
+ {
+ static boolean_t warned = FALSE;
+
+ if (!warned) {
+ printf("vm_page warning: unable to recycle any page\n");
+ warned = 1;
+ }
+ }
}
simple_unlock(&vm_page_queue_free_lock);