An error occurred fetching the project authors.
- 20 Oct, 2004 2 commits
-
-
Dave Hansen authored
I don't know what this is trying to do. It might be some kind of artifact from when get_pgd_slow() was removed. The expanded expression with __pa() ends up looking something like this: (unsigned long)(u64)(u32)pmd-PAGE_OFFSET and that is just nutty because pmd is a pointer now, anyway. Attached patch removes the casts. Signed-off-by:
Dave Hansen <haveblue@us.ibm.com> Signed-off-by:
Andrew Morton <akpm@osdl.org> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
Hugh Dickins authored
Let's lighten the global spinlock mmlist_lock. What's it for? 1. Its original role is to guard mmlist. 2. It later got a second role, to prevent get_task_mm from raising mm_users from the dead, just after it went down to 0. Firstly consider the second: __exit_mm sets tsk->mm NULL while holding task_lock before calling mmput; so mmlist_lock only guards against the exceptional case, of get_task_mm on a kernel workthread which did AIO's use_mm (which transiently sets its tsk->mm without raising mm_users) on an mm now exiting. Well, I don't think get_task_mm should succeed at all on use_mm tasks. It's mainly used by /proc/pid and ptrace, seems at best confusing for those to present the kernel thread as having a user mm, which it won't have a moment later. Define PF_BORROWED_MM, set in use_mm, clear in unuse_mm (though we could just leave it), get_task_mm give NULL if set. Secondly consider the first: and what's mmlist for? 1. Its original role was for swap_out to scan: rmap ended that in 2.5.27. 2. In 2.4.10 it got a second role, for try_to_unuse to scan for swapoff. So, make mmlist a list of mms which maybe have pages on swap: add mm to mmlist when first swap entry is assigned in try_to_unmap_one (pageout), or in copy_page_range (fork); and mmput remove it from mmlist as before, except usually list_empty and there's no need to lock. drain_mmlist added to swapoff, to empty out the mmlist if no swap is then in use. mmput leave mm on mmlist until after its exit_mmap, so try_to_unmap_one can still add mm to mmlist without worrying about the mm_users 0 case; but try_to_unuse must avoid the mm_users 0 case (when an mm might be removed from mmlist, and freed, while it's down in unuse_process): use atomic_inc_return now all architectures support that. Some of the detailed comments in try_to_unuse have grown out of date: updated and trimmed some, but leave SWAP_MAP_MAX for another occasion. Signed-off-by:
Hugh Dickins <hugh@veritas.com> Signed-off-by:
Andrew Morton <akpm@osdl.org> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
- 24 Jun, 2004 1 commit
-
-
Andrew Morton authored
From: Anton Blanchard <anton@samba.org> ../include/linux/swap.h:extern int nr_swap_pages; /* XXX: shouldn't this be ulong? --hch */ Sounds like it should be too me. Some of the code checks for nr_swap_pages < 0 so I made it a long instead. I had to fix up the ppc64 show_mem() (Im guessing there will be other trivial changes required in other 64bit archs, I can find and fix those if you want). I also noticed that the ppc64 show_mem() used ints to store page counts. We can overflow that, so make them unsigned long. Signed-off-by:
Anton Blanchard <anton@samba.org> Signed-off-by:
Andrew Morton <akpm@osdl.org> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
- 13 Apr, 2004 1 commit
-
-
Andrew Morton authored
From: William Lee Irwin III <wli@holomorphy.com> This optimisation was reverted when I was removing all users of page->list. Bill fixed it up, so unrevert it again.
-
- 12 Apr, 2004 1 commit
-
-
Andrew Morton authored
This code is playing with page->lru from pages which came from slab. But to remove page->list we need to convert slab over to using page->lru. So we cannot allow the i386 pagetable code to go scribbling on the ->lru field of active slab pages. This optimisation was pretty thin, and it is more important to shrink the pageframe (on all architectures).
-
- 01 Aug, 2003 1 commit
-
-
Andrew Morton authored
From: William Lee Irwin III <wli@holomorphy.com> The original pgd/pmd slabification patches had a critical bug on non-PAE where both modifications of pgd entries to remove pagetables attached for non-PSE mappings back to a PSE state and modifications of pgd entries to attach pagetables to bring PSE mappings into a non-PSE state were not propagated to cached pgd's. PAE was immune to it owing to the shared kernel pmd. The following patch vs. 2.5.69 restores the slabification done to cache preconstructed pagetables with the proper propagation of conversions to and from PSE mappings to cached pgd's for the non-PAE case. This is an optimization to reduce the bitblitting overhead for spawning small tasks (for larger ones, bottom-level pagetable copies dominate) primarily on non-PAE; the PAE code change is largely to remove #ifdefs and to treat the two cases uniformly, though some positive but small performance improvement has been observed for PAE in one of mbligh's posts. The non-PAE performance improvement has been observed on a box running a script-heavy end-user workload as a large long-term profile hit count reduction for pgd_alloc() and relatives thereof. I would very much appreciate outside testers. Even though I've been able to verify this boots and runs properly and survives several cycles of restarting X on my non-PAE Thinkpad T21, that environment has never been able to reproduce the bug. Those with the proper graphics hardware to prod the affected codepaths into action are the ones best suited to verify proper functionality. There is also some locking introduced; if some performance verification on non-PAE SMP i386 targets (my SMP targets unfortunately all require PAE due to arch code dependencies) that also have the proper hardware could be done, that would help determine whether alternative locking schemes that competed against the one shown here are preferable (in particular, the ticket-based scheme mentioned in the comments).
-
- 02 Jul, 2003 1 commit
-
-
Andrew Morton authored
From: Dave Hansen <haveblue@us.ibm.com> The current numa meminfo code exports (via sysfs) pgdat->node_size, as totalram. This variable is consistently used elsewhere to mean "the number of physical pages that this particular node spans". This is _not_ what we want to see from meminfo, which is: "how much actual memory does this node have?" The following patch removes pgdat->node_size, and replaces it with ->node_spanned_pages. This is to avoid confusion with a new variable, node_present_pages, which is the _actual_ value that we want to export in meminfo. Most of the patch is a simple s/node_size/node_spanned_pages/. The node_size() macro is also removed, and replaced with new ones for node_{spanned,present}_pages() to avoid confusion. We were bitten by this problem in this bug: http://bugme.osdl.org/show_bug.cgi?id=818 Compiled and tested on NUMA-Q.
-
- 12 May, 2003 1 commit
-
-
Linus Torvalds authored
depending on undefined preprocessor symbols evaluating to zero. Make panic.c use proper function prototypes.
-
- 03 May, 2003 1 commit
-
-
Linus Torvalds authored
Cset exclude: akpm@digeo.com|ChangeSet|20030204165956|06074 Cset exclude: akpm@digeo.com|ChangeSet|20030204165949|06077
-
- 20 Apr, 2003 1 commit
-
-
Andrew Morton authored
Remove all the open-coded retry loops in various architectures, use __GFP_REPEAT. It could be that at some time in the future we change __GFP_REPEAT to give up after ten seconds or so, so all the checks for failed allocations are retained.
-
- 06 Mar, 2003 1 commit
-
-
Andrew Morton authored
Patch from Dave Hansen <haveblue@us.ibm.com> __pgd_offset() and pgd_offset() are completely different functions. __pgd_offset() is really just a helper to figure out which entry in a pgd an address would fall into. pgd_offset() does all the leg work and actually fetches the real pgd entry. pgd_index() is a much saner name for what __pgd_offset() does. In fact, we do this: #define __pgd_offset(address) pgd_index(address) The attached patch removes all instances of __pgd_offset and just replaces them with pgd_index. Compiles with and without PAE on x86.
-
- 02 Mar, 2003 1 commit
-
-
Andrew Morton authored
Patch from Christoph Hellwig <hch@sgi.com> There's a bunch of minor fixes needed to disable the swap code for systems with mmu.
-
- 04 Feb, 2003 2 commits
-
-
Andrew Morton authored
From wli A moment's reflection on the subject suggests to me it's worthwhile to generalize pgd_ctor support so it works (without #ifdefs!) on both PAE and non-PAE. This tiny tweak is actually more noticeably beneficial on non-PAE systems but only really because pgd_alloc() is more visible; the most likely reason it's less visible on PAE is "other overhead". It looks particularly nice since it removes more code than it adds. Touch tested on NUMA-Q (PAE). OFTC #kn testers testing the non-PAE case.
-
Andrew Morton authored
From Bill Irwin This allocates pgd's and pmd's using the slab and slab ctors. It has a benefit beyond preconstruction in that PAE pmd's are accounted via /proc/slabinfo Profiling of kernel builds by Martin Bligh shows a 30-40% drop in CPU load due to pgd_alloc()'s page clearing activity. But this was already a tiny fraction of the overall CPU time.
-
- 08 Oct, 2002 1 commit
-
-
Andrew Morton authored
From Martin Bligh. This patch remaps the lmem_map (struct page) arrays for each node onto their own nodes. This is non-trivial, since all of ZONE_NORMAL, and hence permanently mapped KVA resides on node 0. Very early in the boot sequence, it calculates the size of the lmem_map arrays (rounding up to the nearest large page size), and reserves a suitable amount of permanent KVA by shifting down max_low_pfn to create a gap between max_low_pfn and highstart_pfn (both of which are normally about 896Mb). It then uses the new set_pmd_pfn function to set up the pmds correctly so that the large pages point at the physical addresses reserved from the remote nodes. Tested on NUMA-Q and some ratty old i386 PC kicking around under my desk (on 2.5.36-mm1). Was good for a 20% improvement in system time on kernel compile when I initially benchmarked it against 2.5.32 or something - due to a reduction in inter-node traffic, better interconnect cache usage and locality. Should have no effect on any system other than i386 NUMA systems.
-
- 19 Sep, 2002 1 commit
-
-
Andrew Morton authored
Patch from Martin Bligh. It should only affect machines using discontigmem. "This patch cleans up free_area_init stuff, and undefines mem_map and max_mapnr for discontigmem, where they were horrible kludges anyway ... We just use the lmem_maps instead, which makes much more sense. It also kills pgdat->node_start_mapnr, which is tarred with the same brush. It breaks free_area_init_core into a couple of sections, pulls the allocation of the lmem_map back into the next higher function, and passes more things via the pgdat. But that's not very interesting, the objective was to kill mem_map for discontigmem, which seems to attract bugs like flypaper. This brings any misuses to obvious compile-time errors rather than wierd oopses, which I can't help but feel is a good thing. It does break other discontigmem architectures, but in a very obvious way (they won't compile) and it's easy to fix. I think that's a small price to pay ... ;-) At some point soon I will follow up with a patch to remove free_area_init_node for the contig mem case, or at the very least rename it to something more sensible, like __free_area_init. Christoph has grander plans to kill mem_map more extensively in addition to the attatched, but I've heard nobody disagree that it should die for the discontigmem case at least. Oh, and I renamed mem_map in drivers/pcmcia/sa1100 to pc_mem_map because my tiny little brain (and cscope) find it confusing like that. Tested on 16-way NUMA-Q with discontigmem + NUMA support and on a standard PC (well, boots and appears functional). On top of 2.5.33-mm4"
-
- 03 Sep, 2002 1 commit
-
-
Andrew Morton authored
A patch from Martin Bligh which cleans up the open-coded uses of mem_map for ia32. Basically it replaces mem_map + pagenr with pfn_to_page(pagenr) in lots of places. Because mem_map[] doesn't work like that with discontigmem. It also fixes a bug in bad_range, that happens to work for contig mem systems, but is incorrect. Tested both with and without discontigmem support.
-
- 26 Jul, 2002 2 commits
-
-
Linus Torvalds authored
-
Dan Aloni authored
+ cleanup init.c and split into pgtable.c + split declaration of _text, _etext outside into sections.h
-