From: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Date: Wed, 26 Mar 2008 13:02:45 +0100The patch below will speed this up for 32-bit processes but for 64-bit ones it's still going to take a long time. Cat'ing this file writes a 64-bit value for every possible page in the task's address space, which for 64-bit is an enormous number of entries. This is not how this file is supposed to be used. Programs are supposed to inspect /proc/${PID}/maps, and use those ranges to lseek() around the pagemap file and fish out the values they need. This expensive operation is quite harmless, the process can still be killed, it is not unstoppable. commit c101b088ba0ed16d7109b2f3c2d16798d162a535 Author: David S. Miller <davem@davemloft.net> Date: Wed Mar 26 17:32:33 2008 -0700 [SPARC64]: Define TASK_SIZE_OF() This make "cat /proc/${PID}/pagemap" more efficient for 32-bit tasks. Based upon a report by Mariusz Kozlowski. Signed-off-by: David S. Miller <davem@davemloft.net> diff --git a/include/asm-sparc64/processor.h b/include/asm-sparc64/processor.h index 8da484c..885b6a1 100644 --- a/include/asm-sparc64/processor.h +++ b/include/asm-sparc64/processor.h @@ -37,6 +37,9 @@ #endif #define TASK_SIZE ((unsigned long)-VPTE_SIZE) +#define TASK_SIZE_OF(tsk) \ + (test_tsk_thread_flag(tsk,TIF_32BIT) ? \ + (1UL << 32UL) : TASK_SIZE) #ifdef __KERNEL__ #define STACK_TOP32 ((1UL << 32UL) - PAGE_SIZE) --
| Bron Gondwana | BUG: mmapfile/writev spurious zero bytes (x86_64/not i386, bisected, reproducable) |
| Gabriel C | Re: [Announce] [patch] Modular Scheduler Core and Completely Fair Scheduler [CFS] |
| David Miller | [GIT]: Networking |
| Dave Young | Re: 2.6.24-rc3-mm1 |
git: | |
| Matthieu Moy | git push to a non-bare repository |
| Josh Boyer | git-unpack-objects |
| Linus Torvalds | Re: Problem with a push |
| Johannes Schindelin | Re: Git-windows and git-svn? |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| James | Re: OBSD on MacBook |
| Alexey Suslikov | OT: OpenBSD on Asus eeePC |
| Daniel Ouellet | Re: Show your appreciation and get your 4.2 DVD |
| David Pottage | Re: My experience with the Freerunner |
| "Marco Trevisan (Treviño)" | Re: Car charger to GTA02 |
| Neng-Yu Tu (Tony Tu) | GTA02 GPS rework for SD card interference issue |
| Christ van Willegen | Public build host (proposal) |
| Linux Bootup hangs after adding RealTime Premption and HR-Timer | 0 minutes ago | Linux kernel |
| SATA 2 size problems | 1 hour ago | Windows |
| problem with 2.6 kernel driver for a USB MAG Stripe Reader as HID device. | 13 hours ago | Linux kernel |
| get_user_pages failure | 15 hours ago | Linux kernel |
| Reading linux kernel | 16 hours ago | Linux kernel |
| High level of Seagate 2.5" SATA drives failing | 22 hours ago | Hardware |
| Resetting the bios password for Toshiba Laptop | 1 day ago | Hardware |
| Linux 2.6.22 slowly RUNS OUT OF LOWMEM | 1 day ago | Linux kernel |
| Questions about modules | 1 day ago | Linux kernel |
| KDB | 2 days ago | Linux kernel |
