[PATCH] free_page(0) freed pagenr 0x40000

2001-01-11 Thread Hugh Dickins
sys_mount(), and probably others, calls free_page(0) when no page was got. free_pages() allows for this explicitly if CONFIG_DISCONTIGMEM, and _appears_ to allow for it generally by testing VALID_PAGE() - but that test is inadequate, if over 1GB of memory then pagenr 0x4 can be wrongly freed

[PATCH] i386/setup.c cpuinfo notsc

2001-01-15 Thread Hugh Dickins
On Thu, 11 Jan 2001, Linus Torvalds wrote (under Subject: Re: 2.4.1-pre1 breaks XFree 4.0.2 and "w"): We _want_ /proc/cpuinfo to reflect the fact that the kernel considers FSXR/XMM to not exist. That is true information, and is in fact something that install scripts etc can find extremely

[PATCH] udf writepage UnlockPage

2001-01-18 Thread Hugh Dickins
Although fs/udf's args to writepage() were updated in 2.4.0-test12, its page unlocking was overlooked. udf_adinicb_writepage() should now UnlockPage, udf_expand_file_adinicb() should not now UnlockPage after udf_writepage i.e. block_write_full_page. Al Viro posted a patch for the latter, still

Re: set_page_dirty/page_launder deadlock

2001-01-23 Thread Hugh Dickins
On 19 Jan 2001, Christoph Rohland wrote: On Sun, 14 Jan 2001, Linus Torvalds wrote: Well, as the new shm code doesn't return 1 any more, the whole locked page handling should just be deleted. ramfs always just re-marked the page dirty in its own "writepage()" function, so it was only

Re: [patch] swap-speedup-2.4.3-B3 (fwd)

2001-04-26 Thread Hugh Dickins
On Thu, 26 Apr 2001, Linus Torvalds wrote: On the other hand, to offset some of these, we actually count the page accessed _twice_ sometimes: we count it on lookup, and we count it when we see the accessed bit in vmscan.c. Which results in some pages getting aged up twice for just one

Re: the new VMt

2000-09-27 Thread Hugh Dickins
On Wed, 27 Sep 2000, Andrey Savochkin wrote: It's a waste of resources to reserve memory+swap for the case that every running process decides to modify libc code (and, thus, should receive its private copy of the pages). A real waste! A real waste indeed, but a bad example: libc code is

Re: ftruncate not extending files?

2001-03-02 Thread Hugh Dickins
On Fri, 2 Mar 2001, Dmitry A. Fedorov wrote: On Fri, 2 Mar 2001, bert hubert wrote: ftruncate() and truncate() may extend a file but they are not required to do so. I would've sworn, based on the fact that I saw people do it, that ftruncate was a legitimate way to extend a file -

[PATCH] QIC-02 tape broken buffaddr

2001-03-02 Thread Hugh Dickins
I don't have a QIC-02 tape drive to test, but its driver source looks long broken. Note the comment at line 2836 "TODO: does _get_dma_pages() really return the physical address?" and follow uses of buffaddr - sometimes physical, sometimes virtual. Which worked in 2.2, with ISA DMA ignoring

[PATCH] CS89x0 demands too many pages

2001-03-02 Thread Hugh Dickins
The CS89x0 driver wants a 16KB or 64KB dma_buff (if use_dma and ANY_ISA_DMA), thinks it's asking __get_dma_pages() for 4 or 16 pages, but actually it's demanding order 4 or order 16 buffer. Patch below against 2.4.2-ac9 or 2.4.2, offset against 2.4.[01]. Hugh --- 2.4.2-ac9/drivers/net/cs89x0.c

[PATCH] getname() buffer overflow

2001-03-02 Thread Hugh Dickins
The pathname slab cache size was "reduced" from PAGE_SIZE to PATH_MAX + 1 during the 2.4.0-test series, and len similarly adjusted in do_getname(). But its "are we near top of task space?" test should have been adjusted too: could overflow if page size 4KB. Patch below against 2.4.2-ac9, applies

[PATCH] alloc_tty_struct() wastage?

2001-03-02 Thread Hugh Dickins
I've been puzzling over alloc_tty_struct(), which seems determined to waste memory on a machine of page size 8KB. I've come to the conclusion that it represents great caution on Russell's part when introducing ARM, not to interfere with existing code of other architectures - is that so, Russell?

lvm_snap calc_max_buckets num_physpages

2001-03-05 Thread Hugh Dickins
num_physpages is shifted too far in lvm_snap's calc_max_buckets(): would go to 0 on a 4GB, 8GB, ... 32-bit machine. Okay, not quite all the 4GB goes into num_physpages, so it's rather an issue with 5GB ... Naive patch (against 2.4.3-pre2 or 2.4.2-ac11 or 2.4.2 or 2.4.1) below, but I won't be

netfilter ip_conntrack num_physpages

2001-03-05 Thread Hugh Dickins
num_physpages is shifted too far in netfilter's ip_conntrack_init(): would go to 0 on a 4GB, 8GB, ... 32-bit machine. Okay, not quite all the 4GB goes into num_physpages, so it's rather an issue with 5GB ... Naive patch (against 2.4.3-pre2 or 2.4.2-ac11 or 2.4.2 or 2.4.1) below, but I won't be

Re: [PATCH] Re: Can't compile 2.4.2-ac14

2001-03-08 Thread Hugh Dickins
On Thu, 8 Mar 2001, Andrew Morton wrote: "J . A . Magallon" wrote: Try this: This is the better fix. I'm interested in the thinking here (because I tend the other way). With J.A.M.'s patch blessed by Andrew, #ifdef CONFIG_DEBUG_BUGVERBOSE goes around do_BUG() in fault.c, around its extern

[PATCH] sysinfo() = 4GB ram+swap

2001-03-09 Thread Hugh Dickins
1. To maximize compatibility, sys_sysinfo() tries to replace page counts by byte counts if no overflow: but its checks forget the most likely overflow. Just try adding a few 2GB swaps to your system, watching sysinfo() output as you do so. 2. It nicely defends the caller by doing the

Re: Rename all derived CONFIG variables

2001-03-12 Thread Hugh Dickins
On Mon, 12 Mar 2001, Keith Owens wrote: In 2.4.2-ac18 there are 130 CONFIG options that are always derived from other options, the user has no control over them. It is useful for the kernel build process to know which variables are derived and which variables the user can control. If it's

Re: access() says EROFS even for device files if /dev is mounted RO

2000-11-29 Thread Hugh Dickins
On Tue, 28 Nov 2000, Andries Brouwer wrote: On Tue, Nov 28, 2000 at 03:04:31PM +0100, Rogier Wolff wrote: Ok, so if you read the standard carefully you get a bogus result. Why bogus? Things could have been otherwise, but the important part is that all Unices do things the same way.

Re: access() says EROFS even for device files if /dev is mounted RO

2000-11-29 Thread Hugh Dickins
On Wed, 29 Nov 2000, Alexander Viro wrote: On Wed, 29 Nov 2000, Hugh Dickins wrote: Yes, and I think you'll have difficulty, Andries, finding any other Unices which interpret the standard as you and Linux do: Solaris, HP-UX, UnixWare and OpenServer all allow writing to a device node

Re: access() says EROFS even for device files if /dev is mounted RO

2000-11-29 Thread Hugh Dickins
On Wed, 29 Nov 2000, Tigran Aivazian wrote: The classical interpretation of the access(2) system call is "do the same type of permission check as open(2) would do but using real uid in the credentials instead of effective (or on Linux fs) uid". All I am saying is that if open on HP/UX

[PATCH] setup.c cpuinfo flags notsc

2000-12-05 Thread Hugh Dickins
Peter, Some minor mods to test12-pre5 (and earlier) arch/i386/kernel/setup.c: please pass on to Linus if you approve. 1. Your "features" was reverted to "flags", but an extra tab is needed. 2. identify_cpu() re-evaluates x86_capability, which left cpu_has_tsc true (and cpu MHz shown as

[PATCH] setup.c notsc Re: Microsecond accuracy

2000-12-07 Thread Hugh Dickins
On Thu, 7 Dec 2000, Maciej W. Rozycki wrote: On 7 Dec 2000, H. Peter Anvin wrote: Unfortunately the most important instance of the in-kernel flag -- the global one in the somewhat misnamed boot_cpu_data.x86_features -- isn't actually readable in the /proc/cpuinfo file. It is perfectly

Re: Happy new year^H^H^H^Hkernel..

2001-01-03 Thread Hugh Dickins
On Tue, 2 Jan 2001, Kai Germaschewski wrote: I think the problem was that we relied on divert_if being initialized to zero automatically, which didn't happen because it was not declared static and therefore not in .bss (*is this true?*). This is true in this particular case, and your added

Re: PATCH: 2.4.3 tinny module interface cleanum

2001-04-26 Thread Hugh Dickins
On Thu, 26 Apr 2001, Ingo Oeser wrote: On Thu, Apr 26, 2001 at 10:58:46AM +0200, Martin Dalecki wrote: 1. Help making the module interface cleaner by a tinny margin :-). You only help changing the API during a stable[1] series. Wait until 2.5 for this. API cannot change during stable

Re: Linux 2.4.4-ac2

2001-05-01 Thread Hugh Dickins
On Tue, 1 May 2001, J . A . Magallon wrote: On 05.01 Alan Cox wrote: ftp://ftp.kernel.org/pub/linux/kernel/people/alan/2.4/ Hangs after APIC init: (bootlog from ac1) cpu: 0, clocks: 1002300, slice: 334100 CPU0T0:1002288,T1:668176,D:12,S:334100,C:1002300 cpu: 1, clocks: 1002300,

Re: 2.4 and 2GB swap partition limit

2001-05-02 Thread Hugh Dickins
On Wed, 2 May 2001, Stephen C. Tweedie wrote: So the aim is more complex. Basically, once we are short on VM, we want to eliminate redundant copies of swap data. That implies two possible actions, not one --- we can either remove the swap page for data which is already in memory, or we

Re: 2.4.4 Kernel - ASUS CUV4X-DLS Question

2001-05-03 Thread Hugh Dickins
On Thu, 3 May 2001, Alan Cox wrote on APIC problems in 2.4: There are five cases I am seeing 1.Serverworks total APIC hose ups. Fix: remove OSB4 or use -ac tree 2.440BX and similar boards losing interrupts on some drivers Fix: use -ac 3.APIC errors notably checksum

Re: Break 2.4 VM in five easy steps

2001-06-06 Thread Hugh Dickins
On Wed, 6 Jun 2001, Andrew Morton wrote: Yes. The sys_swapoff() system call can take many minutes Haven't looked at it closely, but I think the algorithm could become something like: for (each process) { for (each page in this process) { if (page

Re: [PATCH] Reap dead swap cache earlier v2

2001-06-07 Thread Hugh Dickins
On Thu, 7 Jun 2001, John Stoffel wrote: Shouldn't the swap_count(page) == 1 check be earlier in the if statement, so we can fall through more quickly if there is no work to be done? A small optimization, but putting the common cases first will help. I don't think so: the out-of-line

Re: kernel memory leak: freeing pagetables in vmfree_area_pages in vmalloc.c

2001-06-28 Thread Hugh Dickins
On Thu, 28 Jun 2001 [EMAIL PROTECTED] wrote: I was talking about this leak 2 days back but my mail ot lost.. we have in vfree -- vmfree_area_pages (calling) free_area_pmd (calling) free_area_pte (calling) free_page. The final free_page frees all the pages that are allocated to a memory

Re: CPU capabilities -- an update proposal

2001-02-02 Thread Hugh Dickins
On Fri, 2 Feb 2001, Maciej W. Rozycki wrote: Following is the current state of my CPU capabilities rework. It introduces a new global variable, common_x86_capability, which holds the common set of flags for CPUs. The boot_cpu_data is used appropriately again, i.e. it's treated as

Re: CPU capabilities -- an update proposal

2001-02-02 Thread Hugh Dickins
On Fri, 2 Feb 2001, H. Peter Anvin wrote: diff -up --recursive --new-file linux-2.4.0-ac12.macro/include/asm-i386/bugs.h linux-2.4.0-ac12/include/asm-i386/bugs.h --- linux-2.4.0-ac12.macro/include/asm-i386/bugs.h Sun Jan 28 09:41:20 2001 +++ linux-2.4.0-ac12/include/asm-i386/bugs.h

[PATCH] micro-opt DEBUG_ADD_PAGE

2001-02-07 Thread Hugh Dickins
On Tue, 6 Feb 2001, Linus Torvalds wrote: - if (bh-b_size % correct_size) { + if (bh-b_size != correct_size) { Actually, I'd rather leave it in, but speed it up with the saner and fasterif (bh-b_size (correct_size-1)) { Micro-optimization season? ---

Re: [PATCH] micro-opt DEBUG_ADD_PAGE

2001-02-07 Thread Hugh Dickins
On Wed, 7 Feb 2001, Linus Torvalds wrote: I'd rather not do these kinds of things that the compiler should be able to trivially do for us. (gcc sometimes _does_ do these things. I've seen it. Why doesn't it do it here? Did you check the code? Have you asked the gcc lists?) The

Re: [PATCH] micro-opt DEBUG_ADD_PAGE

2001-02-08 Thread Hugh Dickins
On Wed, 7 Feb 2001, Linus Torvalds wrote: On Wed, 7 Feb 2001, Hugh Dickins wrote: None of those optimizes this: I believe the semantics of "||" (don't try next test if first succeeds) forbid the optimization "|" gives? No. The optimization is entirely

Re: [PATCH] micro-opt DEBUG_ADD_PAGE

2001-02-08 Thread Hugh Dickins
On Thu, 8 Feb 2001, David Weinehall wrote: Well, after all, it's debugging code, and the code now is easy to read. Your code, while more efficient, isn't. I think that clarity takes priority over efficiency in non-critical code such as debugging code. Of course, this is my personal

Re: x86 ptep_get_and_clear question

2001-02-16 Thread Hugh Dickins
On Fri, 16 Feb 2001, Jamie Lokier wrote: And check the Pentium III erratas. There is one with the tlb that's only triggered if 4 instruction lie in a certain window and all access memory in the same way of the tlb (EFLAGS incorrect if 'andl mask,memory_addr' causes page fault)).

Re: [PATCH] a more efficient BUG() macro

2001-02-17 Thread Hugh Dickins
On Sat, 17 Feb 2001, Paul Gortmaker wrote: I was poking around in a vmlinux the other day and was surprised at the amount of repetitive crap text that was in there. For example, try: strings vmlinux|grep $PWD|wc -c which gets some 70KB in my case - depends on strlen($PWD) obviously.

[PATCH] sys_semop() EIDRM BUG fix

2001-02-19 Thread Hugh Dickins
sys_semop() is wrong to insist that queue.status be -EIDRM when sem_lock() fails on awakening. It is quite normal for update_queue() to have set status 0, removed process from queue and woken it; but IPC_RMID come in before that process gets to run (or to lock) - since process already off queue,

[PATCH] IPC id checks off-by-one

2001-02-19 Thread Hugh Dickins
Five IPC id checks against array size are off-by-one. Only the last instance, in ipc_lock(), really matters; but all should be fixed to set the right example. diff -urN linux-2.4.2-pre4/ipc/msg.c linux/ipc/msg.c --- linux-2.4.2-pre4/ipc/msg.c Sat Feb 17 11:14:26 2001 +++ linux/ipc/msg.c Sun

Re: [IDE] meaningless #ifndef?

2001-02-20 Thread Hugh Dickins
On Mon, 19 Feb 2001, Andre Hedrick wrote: On Mon, 19 Feb 2001, Pozsar Balazs wrote: from drivers/ide/ide-features.c: /* * All hosts that use the 80c ribbon mus use! */ byte eighty_ninty_three (ide_drive_t *drive) { return ((byte) ((HWIF(drive)-udma_four) #ifndef

Re: [IDE] meaningless #ifndef?

2001-02-20 Thread Hugh Dickins
On Tue, 20 Feb 2001, Vojtech Pavlik wrote: On Tue, Feb 20, 2001 at 05:45:52PM +, Hugh Dickins wrote: byte eighty_ninty_three (ide_drive_t *drive) { return ((byte) ((HWIF(drive)-udma_four) #ifndef CONFIG_IDEDMA_IVB (drive-id-hw_config

[PATCH] sparc64 module_map dont vfree

2001-03-29 Thread Hugh Dickins
sparc64 has a module_map() modelled on vmalloc(), but using a separate modvmlist of areas. After allocating an area, if the call to allocate the pages and map them in fails, it needs to free that area: which at present it's trying to do by calling vfree() - but that searches vmlist not

[PATCH] PAE zap_low_mappings no-op

2001-03-30 Thread Hugh Dickins
i386 pgd_clear() is now a no-op with PAE as without: so zap_low_mappings() isn't zapping in the PAE case. Patch below against 2.4.3, or 2.4.2-ac28 offset 1 line. Hugh --- 2.4.3/arch/i386/mm/init.c Mon Mar 26 20:01:56 2001 +++ linux/arch/i386/mm/init.c Fri Mar 30 14:46:34 2001 @@ -309,14

Re: memory allocation problems

2001-04-06 Thread Hugh Dickins
On Fri, 6 Apr 2001, Wayne Whitney wrote: As was pointed out to me in January, another solution for i386 would be to fix a maximum stack size and have the mmap() allocations grow downward from the "top" of the stack (3GB - max stack size). I'm not sure why that is not currently done. I'd

[PATCH] 2.4.4-pre1 sparc/mm typo

2001-04-09 Thread Hugh Dickins
--- 2.4.4-pre1/arch/sparc/mm/generic.c Sat Apr 7 08:15:16 2001 +++ linux/arch/sparc/mm/generic.c Mon Apr 9 16:48:42 2001 @@ -21,7 +21,7 @@ struct page *ptpage = pte_page(page); if ((!VALID_PAGE(ptpage)) || PageReserved(ptpage))

Re: scheduler went mad?

2001-04-12 Thread Hugh Dickins
On Thu, 12 Apr 2001 [EMAIL PROTECTED] wrote: I've seen the same scenario about 2-3 times a week. kswapd and one or more processes all CPU bound, totalling to 100%. I've had 'esdplay' hung on several occasions, and 2-3 times it's been xscreensaver (3.29) hung. The 'hung' processes are

[PATCH] emu10k1/audio un reserve

2001-04-17 Thread Hugh Dickins
The code for mem_map_reserving has been copied a little too faithfully to the places where it wants to mem_map_unreserve. Hugh --- 2.4.3-ac7/drivers/sound/emu10k1/audio.c Tue Apr 17 14:43:09 2001 +++ linux/drivers/sound/emu10k1/audio.c Tue Apr 17 14:46:20 2001 @@ -272,7 +272,7 @@

Re: [patch -mm] i386: use pte_update_defer in ptep_test_and_clear_{dirty,young}

2007-04-16 Thread Hugh Dickins
On Fri, 13 Apr 2007, Zachary Amsden wrote: If the logic is too difficult to reason about without entering ganda bherundasana, then it is simpler to just drop the _defer suffix. Old / young actually is just as serious, not because A-bit is critical (although misvirtualizing it will do

Re: [patch -mm] i386: use pte_update_defer in ptep_test_and_clear_{dirty,young}

2007-04-16 Thread Hugh Dickins
On Mon, 16 Apr 2007, David Rientjes wrote: Compromise patch below: would that be satisfactory to you, David? I really like the patch, but for perhaps a slightly different reason: we're only flushing ranges that have been shown to need it. We aren't completely flushing the entire mm

[PATCH] fix OOM killing processes wrongly thought MPOL_BIND

2007-04-18 Thread Hugh Dickins
I only have CONFIG_NUMA=y for build testing: surprised when trying a memhog to see lots of other processes killed with No available memory (MPOL_BIND). memhog is killed correctly once we initialize nodemask in constrained_alloc(). Signed-off-by: Hugh Dickins [EMAIL PROTECTED] --- Perhaps

Re: [PATCH] lazy freeing of memory through MADV_FREE

2007-04-21 Thread Hugh Dickins
On Fri, 20 Apr 2007, Rik van Riel wrote: Andrew Morton wrote: I do go on about that. But we're adding page flags at about one per year, and when we run out we're screwed - we'll need to grow the pageframe. If you want, I can take a look at folding this into the -mapping

Re: [PATCH] lazy freeing of memory through MADV_FREE 2/2

2007-04-21 Thread Hugh Dickins
On Fri, 20 Apr 2007, Ulrich Drepper wrote: Just for reference: the MADV_CURRENT behavior is to throw away data in the range. Not exactly. The Linux MADV_DONTNEED never throws away data from a PROT_WRITE,MAP_SHARED mapping (or shm) - it propagates the dirty bit, the page will eventually get

Re: [PATCH] mm: PageLRU can be non-atomic bit operation

2007-04-23 Thread Hugh Dickins
On Mon, 23 Apr 2007, Hisashi Hifumi wrote: PageLRU flag operation is protected by zone-lru_lock, so SetPageLRU/ClearPageLRU can be replaced to __SetPageLRU/__ClearPageLRU non-atomic bit operation. No. The PG_lru flag bit is just one bit amongst many others: what of concurrent operations

Re: [PATCH] mm: PageLRU can be non-atomic bit operation

2007-04-23 Thread Hugh Dickins
On Mon, 23 Apr 2007, Hisashi Hifumi wrote: No. The PG_lru flag bit is just one bit amongst many others: what of concurrent operations changing other bits in that same unsigned long e.g. trying to lock the page by setting PG_locked? There are some places where such micro-optimizations can be

Re: Pagecache: find_or_create_page does not call a proper page allocator function

2007-04-24 Thread Hugh Dickins
make it unsafe.) Is there a problem with page migration to HIGHMEM, if pages were mapped from a GFP_USER block device? I failed to demonstrate any problem, but here's a quick fix if needed. Signed-off-by: Hugh Dickins [EMAIL PROTECTED] --- 2.6.21-rc7/include/linux/migrate.h 2007-03-07 13:08

Re: [PATCH] mm: PageLRU can be non-atomic bit operation

2007-04-24 Thread Hugh Dickins
On Tue, 24 Apr 2007, Hisashi Hifumi wrote: At 22:42 07/04/23, Hugh Dickins wrote: On Mon, 23 Apr 2007, Hisashi Hifumi wrote: No. The PG_lru flag bit is just one bit amongst many others: what of concurrent operations changing other bits in that same unsigned long e.g. trying to lock

Re: Pagecache: find_or_create_page does not call a proper page allocator function

2007-04-24 Thread Hugh Dickins
On Tue, 24 Apr 2007, Christoph Lameter wrote: On Tue, 24 Apr 2007, Hugh Dickins wrote: I've not yet looked at the patch under discussion, but this remark prompts me... a couple of days ago I got very worried by the various hard-wired GFP_HIGHUSER allocations in mm/migrate.c and mm

Re: Pagecache: find_or_create_page does not call a proper page allocator function

2007-04-24 Thread Hugh Dickins
On Tue, 24 Apr 2007, Christoph Lameter wrote: On Tue, 24 Apr 2007, Hugh Dickins wrote: I've not yet looked at the patch under discussion, but this remark prompts me... a couple of days ago I got very worried by the various hard-wired GFP_HIGHUSER allocations in mm/migrate.c and mm

Re: Pagecache: find_or_create_page does not call a proper page allocator function

2007-04-24 Thread Hugh Dickins
block device? I failed to demonstrate any problem, but here's a quick fix if needed. Signed-off-by: Hugh Dickins [EMAIL PROTECTED] --- include/linux/migrate.h |1 + mm/mempolicy.c |4 ++-- mm/migrate.c| 12 +--- mm/swap_state.c |1 + 4 files changed

Re: Pagecache: find_or_create_page does not call a proper page allocator function

2007-04-24 Thread Hugh Dickins
On Tue, 24 Apr 2007, Christoph Lameter wrote: On Tue, 24 Apr 2007, Hugh Dickins wrote: Or Christoph may prevail in persuading there's no such problem. This is pointless. NUMA allocations can only be controlled for the highest zone. If we switch to a lower zone then we allocate

Re: 2.6.21-rc suspend regression: sysfs deadlock

2007-03-13 Thread Hugh Dickins
On Tue, 13 Mar 2007, Alan Stern wrote: The consensus is that we would be better off keeping Oliver's original patch without your silly change, and instead fixing the particular method call that deadlocked. Can you please try out the patch below with everything else as it was before? It

Re: Question about memory mapping mechanism

2007-03-13 Thread Hugh Dickins
On Fri, 9 Mar 2007, Martin Drab wrote: On Fri, 9 Mar 2007, Martin Drab wrote: On Thu, 8 Mar 2007, Martin Drab wrote: On Thu, 8 Mar 2007, Carsten Otte wrote: On 3/8/07, Martin Drab [EMAIL PROTECTED] wrote: The thing is that I'd like to prevent kernel to swap these pages out,

Re: 2.6.21-rc suspend regression: sysfs deadlock

2007-03-13 Thread Hugh Dickins
On Tue, 13 Mar 2007, Alan Stern wrote: On the other hand, a quick survey of the kernel source shows that DEVICE_ATTR is used over 1500 times. Auditing all of them is not a job for the faint-of-heart! Indeed, and faint-hearted Hugh wasn't intending to do so: but stout-hearted Alan will need

Re: 2.6.21-rc suspend regression: sysfs deadlock

2007-03-15 Thread Hugh Dickins
On Thu, 15 Mar 2007, Cornelia Huck wrote: On Wed, 14 Mar 2007 15:23:10 -0400 (EDT), Alan Stern [EMAIL PROTECTED] wrote: sysfs_work_struct is too generic; other parts of sysfs might also want to use workqueues for different purposes. I don't like calling it delayed-anything, because

Re: 2.6.21-rc suspend regression: sysfs deadlock

2007-03-15 Thread Hugh Dickins
On Thu, 15 Mar 2007, Dmitry Torokhov wrote: How about sysfs_schedule_work? That is what it does - schedules a work on a sysfs object and everyone here knows what schedule_work() does. I'm ashamed to have suggested anything else: certainly gets my vote. Hugh - To unsubscribe from this list:

Re: 2.6.21-rc suspend regression: sysfs deadlock

2007-03-15 Thread Hugh Dickins
On Thu, 15 Mar 2007, Alan Stern wrote: Personally I don't understand what was wrong with my name. What's weird or unintuitive about doing something in a different task's context? The only thing wrong with sysfs_do_something_in_a_different_task_context() is the length of the name. do,

Re: [PATCH] mm/filemap.c: unconditionally call mark_page_accessed

2007-03-15 Thread Hugh Dickins
On Thu, 15 Mar 2007, Nick Piggin wrote: On Thu, Mar 15, 2007 at 11:56:59AM -0400, Chuck Ebbert wrote: Ashif Harji wrote: This patch unconditionally calls mark_page_accessed to prevent pages, especially for small files, from being evicted from the page cache despite frequent access.

Re: thread stacks and strict vm overcommit accounting

2007-03-15 Thread Hugh Dickins
On Thu, 15 Mar 2007, Andrew Morton wrote: On Tue, 13 Mar 2007 18:33:20 +0200 Dan Aloni [EMAIL PROTECTED] wrote: This question is relevent to 2.6.20. I noticed that if the RSS for the stack size is say, 8MB, running I think you meant to say RLIMIT_STACK rather than RSS, didn't you,

Re: Move to unshared VMAs in NOMMU mode?

2007-03-15 Thread Hugh Dickins
On Fri, 9 Mar 2007, David Howells wrote: I've been considering how to deal with the SYSV SHM problem, and I think we may have to move to unshared VMAs in NOMMU mode to deal with this. Currently, what we have is each mm_struct has in its arch-specific context argument a list of VMLs. Take

Re: thread stacks and strict vm overcommit accounting

2007-03-15 Thread Hugh Dickins
On Thu, 15 Mar 2007, Andrew Morton wrote: On Thu, 15 Mar 2007 23:33:43 + Alan Cox [EMAIL PROTECTED] wrote: Stack RSS should certainly be included in Committed_AS, but RLIMIT_STACK merely limits how big the stack vma may grow to: at any moment the stack vma is probably very much

Re: [patch] build error: allnoconfig fails on mincore/swapper_space

2007-02-13 Thread Hugh Dickins
On Tue, 13 Feb 2007, Randy Dunlap wrote: On Tue, 13 Feb 2007 13:48:53 +1100 Nick Piggin wrote: Andrew Morton wrote: On Mon, 12 Feb 2007 14:50:40 -0800 Randy Dunlap [EMAIL PROTECTED] wrote: 2.6.20-git8 on x86_64: LD init/built-in.o LD .tmp_vmlinux1 mm/built-in.o: In

Re: [patch] build error: allnoconfig fails on mincore/swapper_space

2007-02-13 Thread Hugh Dickins
On Tue, 13 Feb 2007, Randy Dunlap wrote: From: Randy Dunlap [EMAIL PROTECTED] Don't check for pte swap entries when CONFIG_SWAP=n. And save 'present' in the vec array. mm/built-in.o: In function `sys_mincore': (.text+0xe584): undefined reference to `swapper_space' Signed-off-by: Randy

Re: [patch] build error: allnoconfig fails on mincore/swapper_space

2007-02-13 Thread Hugh Dickins
On Wed, 14 Feb 2007, Nick Piggin wrote: Can't you have migration without swap? Yes: but then the only swap entry it can find (short of page table corruption, which isn't really the focus of mincore) is a migration entry, isn't it? Hugh - To unsubscribe from this list: send the line

2.6.21-rc4-mm1: init hangs on tty_mutex

2007-03-20 Thread Hugh Dickins
I get a hang at startup or shutdown: tiocsctty() holds tty_mutex, and now with Eric's tty-in-tiocsctty-when-we-steal-a-tty-hang-it-up.patch it can end up calling con_close(), which tries to take tty_mutex. So best revert that in hot-fixes, until Eric provides a better. Signed-off-by: Hugh Dickins

Re: 2.6.21-rc4-mm1: init hangs on tty_mutex

2007-03-21 Thread Hugh Dickins
On Tue, 20 Mar 2007, Eric W. Biederman wrote: Hugh Dickins [EMAIL PROTECTED] writes: I get a hang at startup or shutdown: tiocsctty() holds tty_mutex, and now with Eric's tty-in-tiocsctty-when-we-steal-a-tty-hang-it-up.patch it can end up calling con_close(), which tries to take tty_mutex

Re: [PATCH 0/7] [RFC] hugetlb: pagetable_operations API (V2)

2007-03-21 Thread Hugh Dickins
On Mon, 19 Mar 2007, Adam Litke wrote: Andrew, given the favorable review of these patches the last time around, would you consider them for the -mm tree? Does anyone else have any objections? I quite fail to understand the enthusiasm for these patches. All they do is make the already ugly

Re: revert PIE randomization?

2007-03-21 Thread Hugh Dickins
On Wed, 21 Mar 2007, Kees Cook wrote: Hugh Dickins said: Inconsistency detected by ld.so: rtld.c: 1217: dl_main: Assertion `_rtld_local._dl_rtld_map.l_libname' failed! I'm trying to reproduce the problem you saw (so that I can then test your proposed fix). However, I haven't had any

Re: [PATCH] Add additional error check to mm/mincore.c

2007-03-25 Thread Hugh Dickins
On Sat, 24 Mar 2007, Bruce Dubbs wrote: I some circumstances, mincore can succeed when it shouldn't. Example: Two files are mmapped to a process and they are adjacent in memory. If mincore is run with a requested length that is too large, the function does not differentiate between the

Re: [patch -mm 1/2] i386: add ptep_test_and_clear_{dirty,young}

2007-03-25 Thread Hugh Dickins
ptep_test_and_clear_{dirty,young} by that We don't actually have these comment - it looks a bit as if what you want to do might violate the assumptions he wants to make, but I don't grasp it. Hugh Cc: Hugh Dickins [EMAIL PROTECTED] Cc: Ingo Molnar [EMAIL PROTECTED] Signed-off-by: David Rientjes [EMAIL

Re: [patch -mm 1/2] i386: add ptep_test_and_clear_{dirty,young}

2007-03-25 Thread Hugh Dickins
On Sun, 25 Mar 2007, Zachary Amsden wrote: If you actually clear the bit, you need to: + pte_update_defer(vma-vm_mm, addr, ptep); The reason is, when updating PTEs, the hypervisor must be notified. Using atomic operations to do this is fine for all hypervisors I am aware of.

CONFIG_SCSI_WAIT_SCAN=m

2007-03-27 Thread Hugh Dickins
I'm not using an initrd, most of my kernel is builtin, just a few modules for occasional filesystems. CONFIG_MODULES=y CONFIG_SCSI=y CONFIG_SCSI_SCAN_ASYNC=y CONFIG_SCSI_WAIT_SCAN=m 2.6.21-rc5-mm2 VFS panics unable to find my root on /dev/sda2, but boots okay if I change drivers/scsi/Kconfig to

Re: Invalid operand: kernel BUG at mm/rmap.c:434! and arch/i386/mm/highmem.c:42!)

2007-04-05 Thread Hugh Dickins
On Thu, 5 Apr 2007, Pat wrote: Yes, there is a specific app which seems to be related to the kernel panic. We use a few third party drivers on the system, so my initial suspicions were on: 3w_9xxx(U) which is the RAID card driver and fusedriver(U) which is a hardware PCI card driver.

Re: [PATCH] FUTEX : new PRIVATE futexes

2007-04-06 Thread Hugh Dickins
On Fri, 6 Apr 2007, Nick Piggin wrote: I like |= for adding flags, it seems less ambiguous. But I guess that's a matter of opinion. Hugh seems to like +=, Do I? You probably have a shaming example in mind (PAGE_MAPPING_ANON? that's a hybrid case where using + and - helped minimize the

Re: Shared futexes (was [PATCH] FUTEX : new PRIVATE futexes)

2007-04-06 Thread Hugh Dickins
On Fri, 6 Apr 2007, Peter Zijlstra wrote: some thoughts on shared futexes; Could we get rid of the mmap_sem on the shared futexes in the following manner: - do a page table walk to find the pte; (walk meaning descent down the levels, I presume, rather than across) I've not had time to

Re: PROBLEM: kernel BUG at mm/rmap.c:522!

2007-04-13 Thread Hugh Dickins
On Fri, 13 Apr 2007, Francesco Ricci wrote: [7.7.] Other information that might be relevant to the problem (please look in /proc and include all information that you think to be relevant): Thanks for your report, and for your patience in supplying all that scarcely relevant

[PATCH mm] fix i386 get_gate_vma oops

2007-04-13 Thread Hugh Dickins
to get_gate_vma() which oopses, and I expect we could change that to check priv-tail_vma instead; but no matter, even m_start()'s call just after get_task_mm() is racy.) Signed-off-by: Hugh Dickins [EMAIL PROTECTED] --- 2.6.21-rc6-mm1/arch/i386/kernel/sysenter.c 2007-04-10 11:37:23.0 +0100

Re: [patch -mm] i386: use pte_update_defer in ptep_test_and_clear_{dirty,young}

2007-04-13 Thread Hugh Dickins
. Cc: Zachary Amsden [EMAIL PROTECTED] Cc: Hugh Dickins [EMAIL PROTECTED] Signed-off-by: David Rientjes [EMAIL PROTECTED] Acked-by: Zachary Amsden [EMAIL PROTECTED] David, thanks for cleaning this up. Zach, while looking at your recent patches, I ran across the comment

Re: [patch -mm] i386: use pte_update_defer in ptep_test_and_clear_{dirty,young}

2007-04-13 Thread Hugh Dickins
On Fri, 13 Apr 2007, Zachary Amsden wrote: Hugh Dickins wrote: Zach, while looking at your recent patches, I ran across the comment on pte_update_defer, and where it was being used, and now think that David's patch is actually incorrect. Previously pte_update_defer was being used where

Re: [patch 00/18] 2.6.18-stable review

2007-02-23 Thread Hugh Dickins
On Tue, 20 Feb 2007, Greg KH wrote: This is the start of the stable review cycle for the 2.6.18.8 release. This will be the last release of the 2.6.18-stable series, so if there are patches that you feel should be applied to that tree, please let me know. Responses should be made by

Re: [stable] [patch 00/18] 2.6.18-stable review

2007-02-23 Thread Hugh Dickins
On Fri, 23 Feb 2007, Chris Wright wrote: * Hugh Dickins ([EMAIL PROTECTED]) wrote: There's two from 2.6.19-stable that I thought Chris had agreed for 2.6.18-stable (Linus' mincore and my read_zero_pagealigned); two that I sent Chris cc stable for 2.6.18-stable on 4th January (msync

Re: [PATCH] mm/mincore: Return EFAULT when passed an invalid address.

2007-02-23 Thread Hugh Dickins
On Fri, 23 Feb 2007, Joel Becker wrote: The locking fix to sys_mincore in commit 2f77d107050abc14bc393b34bdb7b91cf670c250 returns -ENOMEM when given a bad userspace address. It should return -EFAULT. No, I think you're getting confused by the way Linus uses access_ok on the address

Re: PREEMPT_RCU breaks anon_vma locking ?

2007-02-24 Thread Hugh Dickins
On Sat, 24 Feb 2007, Oleg Nesterov wrote: If my understanding correct, vmscan can find a page which lives in a already anon_vma_unlink'ed vma. This is ok, the page is pinned, and page-mapping is not cleared until free_hot_cold_page(). That's about right. The page_mapped checks, at several

Re: PREEMPT_RCU breaks anon_vma locking ?

2007-02-24 Thread Hugh Dickins
On Fri, 23 Feb 2007, Paul E. McKenney wrote: This look like a valid fix to me, at least as long as the lock is never dropped in the meantime (e.g., to do I/O). If the lock -is- dropped in the meantime, then presumably whatever is done to keep the page from vanishing should allow an

Re: [PATCH] adapt page_lock_anon_vma() to PREEMPT_RCU

2007-02-28 Thread Hugh Dickins
(anon_vma-lock). Signed-off-by: Oleg Nesterov [EMAIL PROTECTED] Acked-by: Hugh Dickins [EMAIL PROTECTED] Thanks for doing this, and sorry for my delay. Hugh --- WQ/mm/rmap.c~ 2007-02-18 22:56:49.0 +0300 +++ WQ/mm/rmap.c 2007-02-25 22:43:00.0 +0300 @@ -183,7 +183,7

Re: struct page field arrangement

2007-02-28 Thread Hugh Dickins
On Wed, 28 Feb 2007, Jan Beulich wrote: A change early last year reordered struct page so that ptl overlaps not only private, but also mapping. Since spinlock_t can be much larger, I'm wondering whether there's a reason to not also overlay the space index and lru take - are these used for

[PATCH] shmem and simple const super_operations

2007-03-01 Thread Hugh Dickins
shmem's super_operations were missed from the recent const-ification; and simple_fill_super()'s, which can share with get_sb_pseudo()'s. Signed-off-by: Hugh Dickins [EMAIL PROTECTED] --- fs/libfs.c | 10 ++ mm/shmem.c |4 ++-- 2 files changed, 8 insertions(+), 6 deletions

Re: PREEMPT_RCU breaks anon_vma locking ?

2007-03-02 Thread Hugh Dickins
On Sat, 24 Feb 2007, Paul E. McKenney wrote: On Sat, Feb 24, 2007 at 10:04:04PM +, Hugh Dickins wrote: Have you checked through the SLAB_DESTROY_BY_RCU end in slab.c? Is what that's doing still valid? The only thing I see needed due to PREEMPT_RCU is the following comment change

Re: [PATCH 4/9] swap: Simplify shmem_unuse() usage [optional]

2007-03-02 Thread Hugh Dickins
On Fri, 2 Mar 2007, Richard Purdie wrote: Simplify shmem_unuse_inode() removing a confusing optimisation which requires the caller to call swap_duplicate if the shmem_unuse() call doesn't succeed. Based on a patch by Nick Piggin and some of my own changes as discussed on LKML.

Re: [PATCH 3/4] coredump: ELF-FDPIC: enable to omit anonymous shared memory

2007-03-02 Thread Hugh Dickins
On Fri, 16 Feb 2007, David Howells wrote: Robin Holt [EMAIL PROTECTED] wrote: How about: if (vma-vm_mm-coredump_omit_anon_shared) { Then the calls to maydump() would be unchanged: VMAs are a shared resource under NOMMU conditions. That's a disturbing remark. Under

Re: [PATCH 3/4] coredump: ELF-FDPIC: enable to omit anonymous shared memory

2007-03-05 Thread Hugh Dickins
On Sat, 3 Mar 2007, David Howells wrote: Hugh Dickins [EMAIL PROTECTED] wrote: VMAs are a shared resource under NOMMU conditions. That's a disturbing remark. Why? No-one complained when I first put up my rewrite patches three years ago. Never mind whether anyone read your patches

  1   2   3   4   5   6   7   8   9   10   >