Re: [patch] mm: NUMA replicated pagecache

2007-02-13 Thread Nick Piggin
On Tue, Feb 13, 2007 at 07:09:24AM +0100, Nick Piggin wrote: > > Issues: > - Not commented. I want to change the interfaces around anyway. > - Breaks filesystems that use filemap_nopage, but don't call filemap_mkwrite > (eg. XFS). Fix is trivial for most cases. > - Haven&

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

2007-02-14 Thread Nick Piggin
Hugh Dickins wrote: 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? Just doesn't

Re: [patch] mm: NUMA replicated pagecache

2007-02-14 Thread Nick Piggin
On Wed, Feb 14, 2007 at 10:57:00AM -0800, Christoph Lameter wrote: > On Tue, 13 Feb 2007, Nick Piggin wrote: > > > Just tinkering around with this and got something working, so I'll see > > if anyone else wants to try it. > > > > Not proposing for inclusion, b

Re: [patch] mm: NUMA replicated pagecache

2007-02-14 Thread Nick Piggin
On Wed, Feb 14, 2007 at 11:00:02AM -0800, Christoph Lameter wrote: > On Tue, 13 Feb 2007, Nick Piggin wrote: > > > This is a scheme for page replication replicates read-only pagecache pages > > opportunistically, at pagecache lookup time (at points where we know the > >

Re: [patch] mm: NUMA replicated pagecache

2007-02-14 Thread Nick Piggin
On Wed, Feb 14, 2007 at 03:32:04PM -0500, Lee Schermerhorn wrote: > On Tue, 2007-02-13 at 07:09 +0100, Nick Piggin wrote: > > Hi, > > > > Just tinkering around with this and got something working, so I'll see > > if anyone else wants to try it. > > >

[patch 1/2] fs: fix libfs data leak

2007-02-14 Thread Nick Piggin
pare_write behaviour. Luckily, none of those exists in the tree. Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> Index: linux-2.6/fs/libfs.c === --- linux-2.6.orig/fs/libfs.c +++ linux-2.6/fs/libfs.c @@ -335,17 +335,18 @@ int simp

[patch 2/2] fs: fix nobh data leak

2007-02-14 Thread Nick Piggin
, nobh_commit_write does set_page_dirty. If a filesystem wants to allocate backing store for a page dirtied via mmap, page_mkwrite is the suggested approach. Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> Index: linux-2.6/fs/bu

[patch 0/3] 2.6.20 fix for PageUptodate memorder problem (try 4)

2007-02-14 Thread Nick Piggin
Various little cleanups and commenting fixes. Fixed up the patchset so each one, incrementally, should give a properly compiling and running kernel. I'd still like Hugh to ack the anon/swap changes when he can find the time. It would be desirable to get at least one ack as to the overall problem a

[patch 1/3] mm: make read_cache_page synchronous

2007-02-14 Thread Nick Piggin
ew in ecryptfs, 1 in jffs2, and a possible cleared data overwritten with readpage in block2mtd. All depending on whether the filler is async and/or can return with a !uptodate page. Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> drivers/mtd/devices/block2mtd.c |3 -- fs/afs/dir.c

[patch 2/3] fs: buffer don't PageUptodate without page locked

2007-02-14 Thread Nick Piggin
case (it is unusual that the write path does such a thing anyway). Instead just leave it to the read side to bring the page uptodate when it notices that all buffers are uptodate. Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/buffer.c | 11 +-- 1 file changed, 1 inser

[patch 3/3] mm: fix PageUptodate memorder

2007-02-14 Thread Nick Piggin
pying functions which, specially added for anonymous pages for a closely related issue, didn't quite match file backed page handling. Convert core code to use PageUptodate_NoLock. Filesystems are unaffected thanks to the change to read_cache_page. Signed-off-by: Nick Piggin <[EMAIL PROTECT

Re: GPL vs non-GPL device drivers

2007-02-14 Thread Nick Piggin
Ben Nizette wrote: v j wrote: This is in reference to the following thread: http://lkml.org/lkml/2006/12/14/63 I am not sure if this is ever addressed in LKML, but linux is _very_ popular in the embedded space. We (an embedded vendor) chose Linux 3 years back because of its lack of royalty mo

Re: GPL vs non-GPL device drivers

2007-02-15 Thread Nick Piggin
v j wrote: On 2/14/07, Randy Dunlap <[EMAIL PROTECTED]> wrote: At least one of us is confused about that an embedded User is. It seems to me that you are an embedded developer, not User. I doubt that most Embedded Users care what their OS is, or even know what an OS is. I am not sure what th

Re: GPL vs non-GPL device drivers

2007-02-15 Thread Nick Piggin
v j wrote: On 2/14/07, Arjan van de Ven <[EMAIL PROTECTED]> wrote: If your mindset is "how much can I take take take without giving back back back" then personally I think you're sort of acting like a parasite in this context Ok so are thousands of others who are using Linux as their OS

Re: [patch 11/21] Xen-paravirt: Add apply_to_page_range() which applies a function to a pte range.

2007-02-15 Thread Nick Piggin
Andrew Morton wrote: On Thu, 15 Feb 2007 18:25:00 -0800 Jeremy Fitzhardinge <[EMAIL PROTECTED]> wrote: Add a new mm function apply_to_page_range() which applies a given function to every pte in a given virtual address range in a given mm structure. This is a generic alternative to cut-and-pas

Re: [patch 12/21] Xen-paravirt: Allocate and free vmalloc areas

2007-02-15 Thread Nick Piggin
Andrew Morton wrote: On Thu, 15 Feb 2007 23:08:02 -0800 Jeremy Fitzhardinge <[EMAIL PROTECTED]> wrote: Andrew Morton wrote: This won't work when CONFIG_PREEMPT=y. The pagefault handler will see in_atomic() and will scram. Is there some other way to get the pagetable populated for the a

Re: [patch 07/21] Xen-paravirt: remove ctor for pgd cache

2007-02-16 Thread Nick Piggin
Pekka Enberg wrote: On 2/16/07, Jeremy Fitzhardinge <[EMAIL PROTECTED]> wrote: Remove the ctor for the pgd cache. There's no point in having the cache machinery do this via an indirect call when all pgd are freed in the one place anyway. The reason we have slab constructors and destructors

Re: [patch] mm: NUMA replicated pagecache

2007-02-16 Thread Nick Piggin
On Thu, Feb 15, 2007 at 06:29:29PM -0500, Lee Schermerhorn wrote: > > I've attached another patch that closes one race and fixes a context > problem [irq/preemption state] in __unreplicate_page_range(). This > makes the locking even uglier :-(. > > I get further with this patch. Boot all the wa

[patch] mm: NUMA replicated pagecache (rewrite) for 2.6.20

2007-02-16 Thread Nick Piggin
file +++ linux-2.6/mm/Makefile @@ -29,3 +29,4 @@ obj-$(CONFIG_MEMORY_HOTPLUG) += memory_h obj-$(CONFIG_FS_XIP) += filemap_xip.o obj-$(CONFIG_MIGRATION) += migrate.o obj-$(CONFIG_SMP) += allocpercpu.o +obj-$(CONFIG_REPLICATION) += replication.o Index: linux-2.6/mm/replication.c ==

[patch] mm: per-CPU replicated pagecache (for testing)

2007-02-16 Thread Nick Piggin
Trial the replicated pagecache on non-NUMA machines by doing per-CPU replication. Actually there is a slight change in one algorithm because there is no such thing as page_to_cpuid. To minimise the code change, this just pretends smp_processor_id returns a node id. Technically this will blow up i

Re: GPL vs non-GPL device drivers

2007-02-20 Thread Nick Piggin
v j wrote: Now the popularity of Linux is exploding in the embedded space. Nobody talks of VxWorks and OSE anymore. It is all Linux. Perhaps it would be a worthwhile experiment to study this surge in popularity. I am not an expert, but perhaps the reason is "it works so goddamn well and has a we

[patch] perfmon ia64: fix file/vma lifetime

2007-02-20 Thread Nick Piggin
Patch is against 2.6.20. Nick -- From: Nick Piggin <[EMAIL PROTECTED]> Perfmon associates vmalloc()ed memory with a file descriptor, and installs a vma mapping that memory. Unfortunately, the vm_file field is not filled in, so processes with mappings to that memory do not prevent the fil

Re: [patch] perfmon ia64: fix file/vma lifetime

2007-02-20 Thread Nick Piggin
On Tue, Feb 20, 2007 at 06:34:54AM -0800, Stephane Eranian wrote: > nick, > > On Tue, Feb 20, 2007 at 03:18:56PM +0100, Nick Piggin wrote: > > From: Nick Piggin <[EMAIL PROTECTED]> > > > > Perfmon associates vmalloc()ed memory with a file descriptor, and insta

Re: [patch] perfmon ia64: fix file/vma lifetime

2007-02-20 Thread Nick Piggin
On Tue, Feb 20, 2007 at 07:14:08AM -0800, Stephane Eranian wrote: > Nick, > > > Not that I've looked at the code, but can I be hopeful that v2.3 > > using the traditional mmap file operation to set up the vma and map > > in pages, rather than the way that v2.0 works? > > > > It does. You need an

Re: [RFC] Track mlock()ed pages

2007-01-25 Thread Nick Piggin
Christoph Lameter wrote: Add NR_MLOCK Track mlocked pages via a ZVC I think it is not quite right. You are tracking the number of ptes that point to mlocked pages, which can be >= the actual number of pages. Also, page_add_anon_rmap still needs to be balanced with page_remove_rmap. I can't t

Re: [RFC] Track mlock()ed pages

2007-01-26 Thread Nick Piggin
Christoph Lameter wrote: On Fri, 26 Jan 2007, Nick Piggin wrote: Christoph Lameter wrote: Add NR_MLOCK Track mlocked pages via a ZVC I think it is not quite right. You are tracking the number of ptes that point to mlocked pages, which can be >= the actual number of pages. Mloc

Re: [RFC] Track mlock()ed pages

2007-01-26 Thread Nick Piggin
Andrew Morton wrote: On Thu, 25 Jan 2007 22:36:17 -0800 (PST) Christoph Lameter <[EMAIL PROTECTED]> wrote: I can't think of an easy way to do this without per-page state. ie. another page flag. Thats what I am trying to avoid. You could perhaps go for a walk across all the other vmas whi

Re: [PATCH 1/8] Add __GFP_MOVABLE for callers to flag allocations that may be migrated

2007-01-26 Thread Nick Piggin
Mel Gorman wrote: It is often known at allocation time when a page may be migrated or not. This patch adds a flag called __GFP_MOVABLE and a new mask called GFP_HIGH_MOVABLE. Shouldn't that be HIGHUSER_MOVABLE? -- SUSE Labs, Novell Inc. Send instant messages to your online friends http://au.me

Re: [PATCH] mm: remove global locks from mm/highmem.c

2007-01-28 Thread Nick Piggin
Andrew Morton wrote: On Sun, 28 Jan 2007 15:11:34 +0100 Peter Zijlstra <[EMAIL PROTECTED]> wrote: +static inline int set_page_address(struct page *page, void *address) +{ + if (address) + return cmpxchg(&page->virtual, NULL, address) == NULL; + else { +

page_mkwrite caller is racy?

2007-01-29 Thread Nick Piggin
Hi, After do_wp_page calls page_mkwrite on its target (old_page), it then drops the reference to the page before locking the ptl and verifying that the pte points to old_page. Unfortunately, old_page may have been truncated and freed, or reclaimed, then re-allocated and used again for the same p

[patch 0/9] buffered write deadlock fix

2007-01-29 Thread Nick Piggin
The following set of patches attempt to fix the buffered write locking problems (and there are a couple of peripheral patches and cleanups there too). Patches against 2.6.20-rc6. I was hoping that 2.6.20-rc6-mm2 would be an easier diff with the fsaio patches gone, but the readahead rewrite clashes

[patch 1/9] fs: libfs buffered write leak fix

2007-01-29 Thread Nick Piggin
simple_prepare_write and nobh_prepare_write leak uninitialised kernel data. Fix the former, make a note of the latter. Several other filesystems seem to be iffy here, too. Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> Index: linux-2.6/fs/l

[patch 2/9] mm: revert "generic_file_buffered_write(): handle zero length iovec segments"

2007-01-29 Thread Nick Piggin
From: Andrew Morton <[EMAIL PROTECTED]> Revert 81b0c8713385ce1b1b9058e916edcf9561ad76d6. This was a bugfix against 6527c2bdf1f833cc18e8f42bd97973d583e4aa83, which we also revert. Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> I

[patch 4/9] mm: generic_file_buffered_write cleanup

2007-01-29 Thread Nick Piggin
From: Andrew Morton <[EMAIL PROTECTED]> Clean up buffered write code. Rename some variables and fix some types. Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> Index: linu

[patch 3/9] mm: revert "generic_file_buffered_write(): deadlock on vectored write"

2007-01-29 Thread Nick Piggin
e fixing the deadlock by other means. Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Nick says: also it only ever actually papered over the bug, because after faulting in the pages, they might be unmapped or reclaimed. Signed-off-by: Nick Piggin <[EMAIL PROTECTED

[patch 5/9] mm: debug write deadlocks

2007-01-29 Thread Nick Piggin
: Nick Piggin <[EMAIL PROTECTED]> Index: linux-2.6/mm/filemap.c === --- linux-2.6.orig/mm/filemap.c +++ linux-2.6/mm/filemap.c @@ -1894,6 +1894,7 @@ generic_file_buffered_write(struct kiocb if (maxlen &

[patch 6/9] mm: be sure to trim blocks

2007-01-29 Thread Nick Piggin
If prepare_write fails with AOP_TRUNCATED_PAGE, or if commit_write fails, then we may have failed the write operation despite prepare_write having instantiated blocks past i_size. Fix this, and consolidate the trimming into one place. Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> Index:

[patch 9/9] mm: fix pagecache write deadlocks

2007-01-29 Thread Nick Piggin
data via the kernel address space. (also, rename maxlen to seglen, because it was confusing) Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> Index: linux-2.6/mm/filemap.c === --- linux-2.6.orig/mm/filemap.c +++ linux-2.6/m

[patch 7/9] mm: cleanup pagecache insertion operations

2007-01-29 Thread Nick Piggin
very short time, in contrast with the per-CPU pagevecs that are persistent. Net result: 7.3 times fewer lru_lock acquisitions required to add the pages to pagecache for a bulk write (in 4K chunks). Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> Index: linux-

[patch 8/9] mm: generic_file_buffered_write iovec cleanup

2007-01-29 Thread Nick Piggin
Hide some of the open-coded nr_segs tests into the iovec helpers. This is all to simplify generic_file_buffered_write, because that gets more complex in the next patch. Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> Index: linux-2.6/mm/fil

Re: [patch 9/9] mm: fix pagecache write deadlocks

2007-01-29 Thread Nick Piggin
On Mon, Jan 29, 2007 at 11:33:03AM +0100, Nick Piggin wrote: > + } else { > + char *src, *dst; > + src = kmap(src_page); > + dst = kmap(page); > + memcpy(dst + offset, > +

Re: page_mkwrite caller is racy?

2007-01-29 Thread Nick Piggin
Hugh Dickins wrote: On Mon, 29 Jan 2007, Nick Piggin wrote: Moving page_cache_release(old_page) to below the next statement will fix that problem. Yes. I'm reluctant to steal your credit, but also reluctant to go back and forth too much over this: please insert your Signed-off-by _be

Re: [PATCH] mm: remove global locks from mm/highmem.c

2007-01-29 Thread Nick Piggin
Ingo Molnar wrote: For every 64-bit Fedora box there's more than seven 32-bit boxes. I think 32-bit is going to live with us far longer than many thought, so we might as well make it work better. Both HIGHMEM and HIGHPTE is the default on many distro kernels, which pushes the kmap infrastructu

Re: via irq quirk breakage

2007-01-29 Thread Nick Piggin
Jean Delvare wrote: Ni Nick, Alan, Le Mercredi 24 Janvier 2007 01:33, Nick Piggin a écrit : Recently updated an old box to a new kernel, and the USB mouse stops working. Well it sort of works, but stutters and is very unresponsive. This happens now and again when the IRQ routing for my board

Re: via irq quirk breakage

2007-01-30 Thread Nick Piggin
Hi Jean, Jean Delvare wrote: You have an old VT82C686 south bridge, which was tagged as "special" by Alan. For this chip, Alan's code only allows devices 00:00.x to be quirked. As my code was merely a reimplementation of Alan's idea, it does the same. Your USB controllers are at 00:07.x, so I'm

Re: swap map

2007-01-30 Thread Nick Piggin
Christoph Hellwig wrote: On Tue, Jan 30, 2007 at 03:12:35AM -0800, Howard Chu wrote: In the it-would-be-nice department... While I was twiddling with swappiness and benchmarking some code, I thought it would be pretty cool if there was a node in /proc/ that would show which pages of a process

Re: [PATCH] Add "is_power_of_2" checking to log2.h.

2007-01-30 Thread Nick Piggin
Robert P. J. Day wrote: Add the inline function "is_power_of_2()" to log2.h, where the value zero is *not* considered to be a power of two. Signed-off-by: Robert P. J. Day <[EMAIL PROTECTED]> /* + * Determine whether some value is a power of two, where zero is + * *not* considered a powe

Re: [PATCH] VIA IRQ quirk breakage fix

2007-01-30 Thread Nick Piggin
Jean Delvare wrote: Hi Sergey, Le Mardi 30 Janvier 2007 12:47, Sergey Vlasov a écrit : The VT82C686 is very different from other devices, because it is a PCI chip, and its device number is determined by IDSEL wiring. Google shows that several different assignments are in use: 00:01.0: http:

Re: page_mkwrite caller is racy?

2007-01-30 Thread Nick Piggin
Anton Altaparmakov wrote: On Mon, 29 Jan 2007, Mark Fasheh wrote: No page lock please. Generally, Ocfs2 wants to order cluster locks outside of page locks. Also, the sparse b-tree support I'm working on right now will need to be able to allocate in ->page_mkwrite() which would become very nast

Re: [PATCH] Add "is_power_of_2" checking to log2.h.

2007-01-30 Thread Nick Piggin
Robert P. J. Day wrote: On Tue, 30 Jan 2007, Nick Piggin wrote: Robert P. J. Day wrote: Add the inline function "is_power_of_2()" to log2.h, where the value zero is *not* considered to be a power of two. Signed-off-by: Robert P. J. Day <[EMAIL PROTECTED]> /* + * Determ

Re: [patch 0/9] buffered write deadlock fix

2007-01-30 Thread Nick Piggin
On Tue, Jan 30, 2007 at 12:55:58PM -0800, Andrew Morton wrote: > On Mon, 29 Jan 2007 11:31:37 +0100 (CET) > Nick Piggin <[EMAIL PROTECTED]> wrote: > > > The following set of patches attempt to fix the buffered write > > locking problems > > y'know, four

Re: [patch 0/9] buffered write deadlock fix

2007-01-30 Thread Nick Piggin
On Tue, Jan 30, 2007 at 03:21:19PM -0800, Andrew Morton wrote: > On Tue, 30 Jan 2007 12:55:58 -0800 > Andrew Morton <[EMAIL PROTECTED]> wrote: > > > y'know, four or five years back I fixed this bug by doing > > > > current->locked_page = page; > > > > in the write() code, and then teaching t

Re: [PATCH 0 of 4] Generic AIO by scheduling stacks

2007-01-30 Thread Nick Piggin
Linus Torvalds wrote: On Wed, 31 Jan 2007, Benjamin Herrenschmidt wrote: - We would now have some measure of task_struct concurrency. Read that twice, it's scary. As two fibrils execute and block in turn they'll each be referencing current->. It means that we need to audit task_struct to m

Re: [PATCH 0 of 4] Generic AIO by scheduling stacks

2007-01-30 Thread Nick Piggin
Nick Piggin wrote: Linus Torvalds wrote: On Wed, 31 Jan 2007, Benjamin Herrenschmidt wrote: - We would now have some measure of task_struct concurrency. Read that twice, it's scary. As two fibrils execute and block in turn they'll each be referencing current->. It means th

Re: Linux 2.6.20-rc7

2007-01-31 Thread Nick Piggin
Linus Torvalds wrote: if (free_pages <= min + z->lowmem_reserve[classzone_idx]) return 0; gets broken, because the negative 'free_pages' will look like a huge unsigned positive number (and we'll make it unsigned becaue 'min' got turned unsigned). There was a reason tha

[rfc][patch] mm: half-fix page tail zeroing on write problem

2007-02-01 Thread Nick Piggin
Hi, For no important reason, I've again looked at those zeroing patches that Neil did a while back. I've always thought that a simple `write(fd, NULL, size)` would cause the same sorts of problems. Turns out it does. If you first write all 1s into a page, then do the `write(fd, NULL, size)` at th

Re: [rfc][patch] mm: half-fix page tail zeroing on write problem

2007-02-01 Thread Nick Piggin
On Fri, Feb 02, 2007 at 05:29:06PM +1100, Neil Brown wrote: > On Friday February 2, [EMAIL PROTECTED] wrote: > > Hi, > > > > For no important reason, I've again looked at those zeroing patches that > > Neil did a while back. I've always thought that a simple > > `write(fd, NULL, size)` would cause

Re: [PATCH] mm: fix page_mkclean_one

2007-02-02 Thread Nick Piggin
Mark Groves wrote: Hi, I have been been seeing a problem when using sendfile repeatedly on an SMP server, which I believe is related to the problem that was discovered recently with marking dirty pages. The bug, as well as a test script, is listed at http://bugzilla.kernel.org/show_bug.cgi?id=7

Re: [patch 0/9] buffered write deadlock fix

2007-02-02 Thread Nick Piggin
On Fri, Feb 02, 2007 at 03:52:32PM -0800, Andrew Morton wrote: > On Mon, 29 Jan 2007 11:31:37 +0100 (CET) > Nick Piggin <[EMAIL PROTECTED]> wrote: > > > The following set of patches attempt to fix the buffered write > > locking problems (and there are a couple of

Re: [patch 1/9] fs: libfs buffered write leak fix

2007-02-02 Thread Nick Piggin
On Fri, Feb 02, 2007 at 03:52:36PM -0800, Andrew Morton wrote: > On Mon, 29 Jan 2007 11:31:46 +0100 (CET) > Nick Piggin <[EMAIL PROTECTED]> wrote: > > > simple_prepare_write and nobh_prepare_write leak uninitialised kernel data. > > They do? Under what situa

Re: [patch 9/9] mm: fix pagecache write deadlocks

2007-02-02 Thread Nick Piggin
On Fri, Feb 02, 2007 at 03:53:11PM -0800, Andrew Morton wrote: > On Mon, 29 Jan 2007 11:33:03 +0100 (CET) > Nick Piggin <[EMAIL PROTECTED]> wrote: > > > Modify the core write() code so that it won't take a pagefault while > > holding a > > lock on the

Re: [patch 1/9] fs: libfs buffered write leak fix

2007-02-02 Thread Nick Piggin
On Fri, Feb 02, 2007 at 05:58:01PM -0800, Andrew Morton wrote: > On Sat, 3 Feb 2007 02:33:16 +0100 > Nick Piggin <[EMAIL PROTECTED]> wrote: > > > I think just setting page uptodate in commit_write might do the > > trick? (and getting rid of the set_page_dirty there). &g

Re: [patch 1/9] fs: libfs buffered write leak fix

2007-02-02 Thread Nick Piggin
On Fri, Feb 02, 2007 at 06:19:55PM -0800, Andrew Morton wrote: > On Sat, 3 Feb 2007 03:09:26 +0100 > Nick Piggin <[EMAIL PROTECTED]> wrote: > > > From: Nick Piggin <[EMAIL PROTECTED]> > > To: Andrew Morton <[EMAIL PROTECTED]> > > argh. Yesterday all

Re: [PATCH 1/2] atomic.h atomic64_t standardization

2006-12-01 Thread Nick Piggin
Mathieu Desnoyers wrote: Hi, I finalized the work for atomic64_t cmpxchg and atomic64_add_unless on all architectures. asm-generic/atomic.h atomic_long_t is also streamlined. Review is welcome. Beautiful! Now I can do the rwsem consolidation. Thanks. Nick -- SUSE Labs, Novell Inc. Send inst

Re: [patch 3/3] fs: fix cont vs deadlock patches

2006-11-30 Thread Nick Piggin
On Fri, Dec 01, 2006 at 07:14:28AM +0900, OGAWA Hirofumi wrote: > > quick look. Doesn't this break reiserfs? IIRC, the reiserfs is using > it for another reason. I was also working for this, but I lost the > thread of this, sorry. Yes I think it will break reiserfs, so I just have to have a look

Re: [patch 3/3] fs: fix cont vs deadlock patches

2006-11-30 Thread Nick Piggin
On Fri, Dec 01, 2006 at 10:11:14AM +0900, OGAWA Hirofumi wrote: > Nick Piggin <[EMAIL PROTECTED]> writes: > > > I would be happy if you come up with a quick fix, I'm just trying to > > stamp out a few big bugs in mm. However I did prefer my way of moving

Re: [patch 3/3] fs: fix cont vs deadlock patches

2006-11-30 Thread Nick Piggin
On Fri, Dec 01, 2006 at 07:14:28AM +0900, OGAWA Hirofumi wrote: > > quick look. Doesn't this break reiserfs? IIRC, the reiserfs is using > it for another reason. I was also working for this, but I lost the > thread of this, sorry. > > I found some another users (affs, hfs, hfsplus). Those seem ha

Re: [patch 3/3] fs: fix cont vs deadlock patches

2006-11-30 Thread Nick Piggin
On Fri, Dec 01, 2006 at 12:41:25PM +0900, OGAWA Hirofumi wrote: > Nick Piggin <[EMAIL PROTECTED]> writes: > > > > So basically this is changing from having prepare_write do all the > > zeroing, to zeroing the last page in generic_cont_expand, so that > > we do

Re: [patch 3/3] fs: fix cont vs deadlock patches

2006-11-30 Thread Nick Piggin
On Fri, Dec 01, 2006 at 12:41:25PM +0900, OGAWA Hirofumi wrote: > > Yes, this patch doesn't pass zero-length to prepare_write. However, > I'm not checking this patch is ok for reiserfs... OK, vfat wasn't working correctly for me -- I needed the following patch: Index: linux-2.6/fs/buffer.c =

Re: [patch 3/3] fs: fix cont vs deadlock patches

2006-11-30 Thread Nick Piggin
On Thu, Nov 30, 2006 at 11:21:02PM -0800, Andrew Morton wrote: > On Fri, 1 Dec 2006 06:08:52 +0100 > Nick Piggin <[EMAIL PROTECTED]> wrote: > > > On Fri, Dec 01, 2006 at 12:41:25PM +0900, OGAWA Hirofumi wrote: > > > > > > Yes, this patch doesn'

Re: [patch 3/3] fs: fix cont vs deadlock patches

2006-12-01 Thread Nick Piggin
OGAWA Hirofumi wrote: Nick Piggin <[EMAIL PROTECTED]> writes: status = __block_prepare_write(inode, new_page, zerofrom, PAGE_CACHE_SIZE, get_block); if (status) @@ -2110,7 +2111,7 @@ memset

[new patch 3/3] fs: fix cont vs deadlock patches

2006-12-01 Thread Nick Piggin
air instead... maybe the code would be cleaner if reiserfs just did the operation explicitly (call get_block or whatever helper is used to unpack the tail)? Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> Index: linux-2.6/fs/buffer.c ===

[rfc] possible page manipulation simplifications?

2006-12-02 Thread Nick Piggin
Hi, While working in this area, I noticed a few things we do that may not have a positive payoff under the most common conditions. Untested yet, and probably needs a bit of instrumentation, but it saves about half a K of code, lots of branches, and makes things look nicer. Any thoughts? Quite a b

Re: radix-tree.c:__lookup_slot() dead code removal

2006-12-04 Thread Nick Piggin
Frank van Maarseveen wrote: Most of the code suggests that it is valid to insert a NULL item, possibly a zero item with pointer cast. However, in __lookup_slot() whether or not the slot is found seems to depend on the actual value of the item in one special case. But further on it doesn't make an

Re: drop_pagecache: Possible circular locking dependency

2006-12-04 Thread Nick Piggin
Fengguang Wu wrote: I'd like to move this sysctl interface to the upcoming /proc/filecache. Being a module, it helps reduce the kernel size :) What's /proc/filecache? -- SUSE Labs, Novell Inc. Send instant messages to your online friends http://au.messenger.yahoo.com - To unsubscribe from

Re: [patch][rfc] rwsem: generic rwsem

2006-12-04 Thread Nick Piggin
On Mon, Dec 04, 2006 at 11:06:07AM +0100, Nick Piggin wrote: > (resending with correct ML addresses, sorry) > > Hi, > > This patch needs review and testing from the architecture guys, but > I would like to consider it because of the obvious maintenance benefits. Hah, ver

Re: la la la la ... swappiness

2006-12-04 Thread Nick Piggin
Aucoin wrote: We want it to swap less for this particular operation because it is low priority compared to the rest of what's going on inside the box. We've considered both artificially manipulating swap on the fly similar to your suggestion as well a parallel thread that pumps a 3 into drop_cac

Re: [rfc] possible page manipulation simplifications?

2006-12-04 Thread Nick Piggin
On Mon, Dec 04, 2006 at 02:40:05PM +, Mel Gorman wrote: > On (02/12/06 13:15), Nick Piggin didst pronounce: > > Hi, > > > > While working in this area, I noticed a few things we do that may not > > have a positive payoff under the most common conditions. Untested ye

Re: la la la la ... swappiness

2006-12-04 Thread Nick Piggin
Aucoin wrote: From: Nick Piggin [mailto:[EMAIL PROTECTED] We had customers see similar incorrect OOM problems, so I sent in some patches merged after 2.6.16. Can you upgrade to latest kernel? (otherwise I guess backporting could be an option for you). I will raise the question of moving the

Re: [patch][rfc] rwsem: generic rwsem

2006-12-04 Thread Nick Piggin
On Mon, Dec 04, 2006 at 12:55:16PM +, David Howells wrote: > Nick Piggin <[EMAIL PROTECTED]> wrote: > > > Move to an architecture independent rwsem implementation, using the > > better of the two rwsem implementations (ie. the one which doesn't > > take a sp

Re: -mm merge plans for 2.6.20

2006-12-04 Thread Nick Piggin
Paul Mackerras wrote: Andrew Morton writes: radix-tree-rcu-lockless-readside.patch There's no reason to merge this yet. We want to use it in some powerpc arch code. Currently we use a per-cpu array of spinlocks, and this patch would let us get rid of that array. I'd like to get another

Re: -mm merge plans for 2.6.20

2006-12-04 Thread Nick Piggin
Andrew Morton wrote: On Tue, 5 Dec 2006 16:14:03 +1100 Paul Mackerras <[EMAIL PROTECTED]> wrote: radix-tree-rcu-lockless-readside.patch There's no reason to merge this yet. We want to use it in some powerpc arch code. Currently we use a per-cpu array of spinlocks, and this patch would let

Re: la la la la ... swappiness

2006-12-04 Thread Nick Piggin
Aucoin wrote: From: Linus Torvalds [mailto:[EMAIL PROTECTED] I actually suspect you should be _fairly_ close to such a situation We run with min_free_kbytes set around 4k to answer your earlier question. Louis, exactly how do you allocate that big 1.6GB shared area? Ummm, shm_open, ftrun

Status of buffered write path (deadlock fixes)

2006-12-04 Thread Nick Piggin
Hi, I'd like to try to state where we are WRT the buffered write patches, and ask for comments. Sorry for the wide cc list, but this is an important issue which hasn't had enough review. Well the next -mm will include everything we've done so far. I won't repost patches unless someone would like

Re: 2.6.19-rc5-mm1 progression

2006-12-07 Thread Nick Piggin
Peter Zijlstra wrote: On Mon, 2006-12-04 at 21:32 -0600, Larry Finger wrote: There are at least two patches in 2.6.19-rc5-mm2 that make my system much more responsive for interactive jobs. The one that has the majority of the effect is: radix-tree-rcu-lockless-readside.patch I have not been

Re: [PATCH] WorkStruct: Implement generic UP cmpxchg() where an arch doesn't support it

2006-12-07 Thread Nick Piggin
Linus Torvalds wrote: On Thu, 7 Dec 2006, Roman Zippel wrote: On Wed, 6 Dec 2006, Matthew Wilcox wrote: To be honest, it'd be much easier if we only defined these operations on atomic_t's. We have all the infrastructure in place for them, and they're fairly well understood. If you need di

Re: [PATCH] WorkStruct: Implement generic UP cmpxchg() where an arch doesn't support it

2006-12-07 Thread Nick Piggin
Russell King wrote: On Wed, Dec 06, 2006 at 11:16:55AM -0800, Christoph Lameter wrote: No. If you read what I said, you'll see that you can _cheaply_ use cmpxchg in a ll/sc based implementation. Take an atomic increment operation. do { old = load_locked(addr);

Re: [PATCH] WorkStruct: Implement generic UP cmpxchg() where an arch doesn't support it

2006-12-07 Thread Nick Piggin
Russell King wrote: On Thu, Dec 07, 2006 at 08:31:08PM +1100, Nick Piggin wrote: Implementing ll/sc based accessor macros allows both ll/sc _and_ cmpxchg architectures to produce optimal code. Implementing an cmpxchg based accessor macro allows cmpxchg architectures to produce optimal code

Re: [patch][rfc] rwsem: generic rwsem

2006-12-07 Thread Nick Piggin
On Tue, Dec 05, 2006 at 08:36:22PM +, David Howells wrote: > Nick Piggin <[EMAIL PROTECTED]> wrote: > > > Either approach works, and one is better than the current two approaches. > > >From one point of view that's true. But from other points of view, it isn

Re: Status of buffered write path (deadlock fixes)

2006-12-07 Thread Nick Piggin
Mark Fasheh wrote: Hi Nick, On Tue, Dec 05, 2006 at 05:52:02PM +1100, Nick Piggin wrote: Hi, I'd like to try to state where we are WRT the buffered write patches, and ask for comments. Sorry for the wide cc list, but this is an important issue which hasn't had enough review.

Re: [PATCH] WorkStruct: Implement generic UP cmpxchg() where an arch doesn't support it

2006-12-08 Thread Nick Piggin
Russell King wrote: On Fri, Dec 08, 2006 at 12:18:52PM +1100, Nick Piggin wrote: Russell King wrote: On Thu, Dec 07, 2006 at 08:31:08PM +1100, Nick Piggin wrote: Implementing ll/sc based accessor macros allows both ll/sc _and_ cmpxchg architectures to produce optimal code. Implementing

Re: [PATCH] WorkStruct: Implement generic UP cmpxchg() where an

2006-12-10 Thread Nick Piggin
Hi "Linux", [EMAIL PROTECTED] wrote: Even if ARM is able to handle any arbitrary C code between the "load locked" and store conditional API, other architectures can not by definition. Maybe so, but I think you and Linus are missing the middle ground. Nobdy argued against adding nice arch sp

Re: 2.6.19-mm1

2006-12-11 Thread Nick Piggin
Andrew Morton wrote: Temporarily at http://userweb.kernel.org/~akpm/2.6.19-mm1/ Will appear later at ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.19/2.6.19-mm1/ - There's some new runtime debugging in kmap_atomic(). It catches one buglet in in ata_scs

Re: 2.6.19-mm1

2006-12-11 Thread Nick Piggin
Jiri Kosina wrote: On Mon, 11 Dec 2006, Andrew Morton wrote: Temporarily at http://userweb.kernel.org/~akpm/2.6.19-mm1/ Am I the only one seeing something strange on ext3 with this kernel? For example /etc/resolv.conf gets corrupted during the dhclient run. It looks like this, aft

Re: 2.6.19-mm1

2006-12-11 Thread Nick Piggin
Jiri Kosina wrote: On Tue, 12 Dec 2006, Nick Piggin wrote: Am I the only one seeing something strange on ext3 with this kernel? For example /etc/resolv.conf gets corrupted during the dhclient run. It looks like this, after dhclient finishes: Do you have CONFIG_DEBUG_VM turned on? I think

Re: [PATCH] WorkStruct: Implement generic UP cmpxchg() where an

2006-12-10 Thread Nick Piggin
[EMAIL PROTECTED] wrote: atomic_ll() / atomic_sc() with the restriction that they cannot be nested, you cannot write any C code between them, and may only call into some specific set of atomic_llsc_xxx primitives, operating on the address given to ll, and must not have more than a given number of

Re: Status of buffered write path (deadlock fixes)

2006-12-11 Thread Nick Piggin
Mark Fasheh wrote: On Fri, Dec 08, 2006 at 02:28:10PM +1100, Nick Piggin wrote: In generic_file_buffered_write() we now do: status = a_ops->commit_write(file, page, offset,offset+copied); Which tells the file system to commit only the amount of data that filemap_copy_from_user()

Re: Status of buffered write path (deadlock fixes)

2006-12-11 Thread Nick Piggin
Nick Piggin wrote: Mark Fasheh wrote: If we make the change I described above (looking for BH_New buffers outside the range passed), then zero length or partial shouldn't matter, but zero length instead of partial would be nicer imho just for the sake of reducing the total number of

Re: Status of buffered write path (deadlock fixes)

2006-12-11 Thread Nick Piggin
Nick Piggin wrote: Mark Fasheh wrote: ->commit_write() would probably do fine. Currently, block_prepare_write() uses it to know which buffers were newly allocated (the file system specific get_block_t sets the bit after allocation). I think we could safely move the clearing of that bit

Re: Status of buffered write path (deadlock fixes)

2006-12-11 Thread Nick Piggin
Steven Whitehouse wrote: Hmm, doesn't look like we can do this either because at least GFS2 uses BH_New for its own special things. What makes you say that? As far as I know we are not doing anything we shouldn't with this flag, and if we are, then I'm quite happy to consider fixing it up so

<    7   8   9   10   11   12   13   14   15   16   >