Re: [RFC: 2.6 patch] remove ISA legacy functions

2005-11-11 Thread Matthew Wilcox
On Sat, Nov 12, 2005 at 12:08:29AM -0500, Jeff Garzik wrote: it's not valid to mark working drivers broken, IMO. Mark them x86-only, perhaps. hp100 works fine on parisc. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More

Re: [RFC: 2.6 patch] remove ISA legacy functions

2005-11-11 Thread Matthew Wilcox
On Sat, Nov 12, 2005 at 12:27:56AM -0500, Jeff Garzik wrote: Matthew Wilcox wrote: On Sat, Nov 12, 2005 at 12:08:29AM -0500, Jeff Garzik wrote: it's not valid to mark working drivers broken, IMO. Mark them x86-only, perhaps. hp100 works fine on parisc. Certainly. The point

Re: [PATCH] Introduce BROKEN_ON_64BIT facility

2006-10-02 Thread Matthew Wilcox
On Mon, Oct 02, 2006 at 04:12:35PM +0100, Alan Cox wrote: @@ -1423,14 +1418,15 @@ printk(KERN_ERR DEV_LABEL can't allocate DLEs\n); goto err_out; } - iadev-rx_dle_q.start = (struct dle*)dle_addr; + iadev-rx_dle_q.start = (struct dle *)dle_addr;

[PATCH] [TULIP] Fix section mismatch in de2104x.c

2006-10-06 Thread Matthew Wilcox
.data.rel.local after 'de_driver' (at offset 0x28) Signed-off-by: Helge Deller [EMAIL PROTECTED] Signed-off-by: Kyle McMartin [EMAIL PROTECTED] Signed-off-by: Matthew Wilcox [EMAIL PROTECTED] --- drivers/net/tulip/de2104x.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git

Re: [PATCH] [TULIP] Fix section mismatch in de2104x.c

2006-10-06 Thread Matthew Wilcox
On Fri, Oct 06, 2006 at 02:39:41PM -0400, Jeff Garzik wrote: I'm a bit blind, so help me out here... what precisely is mismatched? AFAICS everything is properly marked __init or __exit. Wasn't my patch, but the markings are now consistent with tulip_core at least. - To unsubscribe from this

Re: [PATCH] [TULIP] Fix section mismatch in de2104x.c

2006-10-06 Thread Matthew Wilcox
On Fri, Oct 06, 2006 at 03:18:33PM -0400, Jeff Garzik wrote: Stephen Hemminger wrote: On Fri, 06 Oct 2006 12:12:34 -0600 Matthew Wilcox [EMAIL PROTECTED] wrote: From: Helge Deller [EMAIL PROTECTED] WARNING: drivers/net/tulip/de2104x.o - Section mismatch: reference

Re: [PATCH] [TULIP] Fix section mismatch in de2104x.c

2006-10-06 Thread Matthew Wilcox
On Fri, Oct 06, 2006 at 03:44:30PM -0400, Jeff Garzik wrote: Matthew Wilcox wrote: On Fri, Oct 06, 2006 at 03:18:33PM -0400, Jeff Garzik wrote: This device will never ever meet a platform where it can be hotplugged. According to a FreeBSD list from 1995, you could get these chips on a PCI

[PATCH 1/2] [PCI] Check that MWI bit really did get set

2006-10-06 Thread Matthew Wilcox
Since some devices may not implement the MWI bit, we should check that the write did set it and return an error if it didn't. Signed-off-by: Matthew Wilcox [EMAIL PROTECTED] diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index a544997..3d041f4 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci

From: Matthew Wilcox [EMAIL PROTECTED]

2006-10-06 Thread Matthew Wilcox
Since some devices may not implement the MWI bit, we should check that the write did set it and return an error if it didn't. Signed-off-by: Matthew Wilcox [EMAIL PROTECTED] diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index a544997..3d041f4 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci

From: Matthew Wilcox [EMAIL PROTECTED]

2006-10-06 Thread Matthew Wilcox
We used to check whether pci_set_mwi() had succeeded by testing the hardware MWI bit. Now we need only check the return value (and failing to do so is a warning). Also, pci_set_mwi() will fail if the cache line size is 0, so we don't need to check that ourselves any more. Signed-off-by: Matthew

[PATCH 2/2] [TULIP] Check the return value from pci_set_mwi()

2006-10-06 Thread Matthew Wilcox
We used to check whether pci_set_mwi() had succeeded by testing the hardware MWI bit. Now we need only check the return value (and failing to do so is a warning). Also, pci_set_mwi() will fail if the cache line size is 0, so we don't need to check that ourselves any more. Signed-off-by: Matthew

Re: From: Matthew Wilcox [EMAIL PROTECTED]

2006-10-06 Thread Matthew Wilcox
On Fri, Oct 06, 2006 at 01:01:34PM -0600, Matthew Wilcox wrote: Sorry about these. Stupid git-send-email requires a line of garbage before the headers. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http

Re: [PATCH 2/2] [TULIP] Check the return value from pci_set_mwi()

2006-10-06 Thread Matthew Wilcox
On Fri, Oct 06, 2006 at 03:15:15PM -0400, Jeff Garzik wrote: Matthew Wilcox wrote: Also, pci_set_mwi() will fail if the cache line size is 0, so we don't need to check that ourselves any more. NAK, not true on all arches. sparc64 at least presumes that the firmware DTRT with cacheline

Re: [PATCH 1/2] [PCI] Check that MWI bit really did get set

2006-10-14 Thread Matthew Wilcox
On Fri, Oct 13, 2006 at 09:41:35PM -0700, Andrew Morton wrote: Bisection shows that this patch (pci-check-that-mwi-bit-really-did-get-set.patch in Greg's PCI tree) breaks suspend-to-disk on my Vaio. It writes the suspend image and gets to the point where it's supposed to power down, but

Re: [PATCH 1/2] [PCI] Check that MWI bit really did get set

2006-10-14 Thread Matthew Wilcox
On Sat, Oct 14, 2006 at 01:48:55PM -0700, Andrew Morton wrote: On Sat, 14 Oct 2006 08:02:49 -0600 Matthew Wilcox [EMAIL PROTECTED] wrote: On Fri, Oct 13, 2006 at 09:41:35PM -0700, Andrew Morton wrote: Bisection shows that this patch (pci-check-that-mwi-bit-really-did-get-set.patch

Re: [Bulk] Re: [PATCH 1/2] [PCI] Check that MWI bit really did get set

2006-10-15 Thread Matthew Wilcox
On Sun, Oct 15, 2006 at 12:08:09AM -0700, David Brownell wrote: But the only effect of returning EINVAL is a printk (for this particular driver): /* PCI Memory-Write-Invalidate cycle support is optional (uncommon) */ retval = pci_set_mwi(pdev); if (!retval)

Re: [PATCH 1/2] [PCI] Check that MWI bit really did get set

2006-10-15 Thread Matthew Wilcox
On Sat, Oct 14, 2006 at 11:53:59PM -0700, Andrew Morton wrote: It seems to have stopped happening. I don't know why. Argh. Possibly a mistake during the bisect procedure? gregkh-pci-pci-prevent-user-config-space-access-during-power-state-transitions.patch still breaks suspend though:

Re: [Bulk] Re: [PATCH 1/2] [PCI] Check that MWI bit really did get set

2006-10-15 Thread Matthew Wilcox
On Sun, Oct 15, 2006 at 03:21:22PM +0100, Alan Cox wrote: Ar Sul, 2006-10-15 am 00:08 -0700, ysgrifennodd David Brownell: Since it's not an error, there should be no such printk ... which is exactly how it's coded above. The underlying bug is that someone marked pci_set_mwi must-check,

Re: pcnet32 devices with incorrect trident vendor ID

2006-01-12 Thread Matthew Wilcox
On Thu, Jan 12, 2006 at 08:49:42PM +, Daniel Drake wrote: interesting: http://forums.gentoo.org/viewtopic-t-420013-highlight-trident.html The user saw the correct vendor ID (AMD) in 2.4, but when upgrading to 2.6, it changed to Trident. It looks to me like there used to be a quirk

[PATCH] Rewrite e100_phys_id

2006-10-26 Thread Matthew Wilcox
on the internal interface of an HP Integrity rx2600. Signed-off-by: Matthew Wilcox [EMAIL PROTECTED] diff --git a/drivers/net/e100.c b/drivers/net/e100.c index a3a08a5..aade1e9 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c @@ -556,7 +556,6 @@ struct nic { struct params params; struct

Re: [PATCH] Rewrite e100_phys_id

2006-10-26 Thread Matthew Wilcox
On Thu, Oct 26, 2006 at 01:04:32PM -0700, Auke Kok wrote: no objections, so I'll ACK it with the notion that I'm going to let our labs do some more testing on it with all the latest changes to it. Thanks, Auke. Here's the equivalent patch for e1000. I don't have a convenient machine to test

Re: [PATCH] Rewrite e100_phys_id

2006-11-07 Thread Matthew Wilcox
On Tue, Nov 07, 2006 at 10:33:14AM -0800, Auke Kok wrote: Matthew Wilcox wrote: Tested on the internal interface of an HP Integrity rx2600. bad news, it's completely hosed. The adapter does some indistinguishable blinking for a second, then stops blinking alltogether. Weird. I tested

[PATCH] ethtool_perm_addr only has one implementation

2007-07-29 Thread Matthew Wilcox
All drivers implement ethtool get_perm_addr the same way -- by calling the generic function. So we can inline the generic function into the caller and avoid going through the drivers. Signed-off-by: Matthew Wilcox [EMAIL PROTECTED] diff -u b/net/core/ethtool.c b/net/core/ethtool.c --- b/net

Re: [2.6 patch] unexport dev_ethtool

2007-08-14 Thread Matthew Wilcox
On Tue, Aug 14, 2007 at 11:22:03PM +0200, Adrian Bunk wrote: This patch removes the no longer used EXPORT_SYMBOL(dev_ethtool). Signed-off-by: Adrian Bunk [EMAIL PROTECTED] Acked-by: Matthew Wilcox [EMAIL PROTECTED] -- Bill, look, we understand that you're interested in selling us

Re: oops with recent wireless-dev tree

2007-08-30 Thread Matthew Wilcox
-get_settings) { Since Stephen's already bagged fixing this, I shan't send a patch. But if it includes something like the line above please add: Acked-by: Matthew Wilcox [EMAIL PROTECTED] -- Intel are signing my paycheques ... these opinions are still mine Bill, look, we understand that you're

Re: oops with recent wireless-dev tree

2007-08-30 Thread Matthew Wilcox
On Thu, Aug 30, 2007 at 05:01:31PM +0200, Johannes Berg wrote: Jochen had a patch: http://marc.info/?l=linux-wirelessm=118842715026614w=2 That's exactly the right patch, please add Acked-by: Matthew Wilcox [EMAIL PROTECTED] I just checked over the commit that introduced the bug, and I didn't

Re: [PATCH] bridge: fix OOPS when bridging device without ethtool

2007-08-30 Thread Matthew Wilcox
without disturbing userspace. Signed-off-by: Stephen Hemminger [EMAIL PROTECTED] Acked-by: Matthew Wilcox [EMAIL PROTECTED] -- Intel are signing my paycheques ... these opinions are still mine Bill, look, we understand that you're interested in selling us this operating system, but compare

Re: [BUG] New Kernel Bugs

2007-11-13 Thread Matthew Wilcox
On Tue, Nov 13, 2007 at 12:50:08PM -0500, Mark Lord wrote: It's a 540MByte download over a slow link for everyone else. Where do you get this number from? $ du -sh .git/objects/pack/ 249M.git/objects/pack/ $ du -sh .git/objects/ 253M.git/objects/ ie about half what you claim. -- Intel

Re: [BUG] New Kernel Bugs

2007-11-13 Thread Matthew Wilcox
On Tue, Nov 13, 2007 at 01:43:53PM -0500, Mark Lord wrote: Matthew Wilcox wrote: ie about half what you claim. .. No, it's from earlier in this very thread: Adrian Bunk wrote: git clone \ git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git .. mkdir t cd t git

Re: [BUG] New Kernel Bugs

2007-11-14 Thread Matthew Wilcox
On Wed, Nov 14, 2007 at 12:46:20AM -0700, Denys Vlasenko wrote: Finally they replied and asked to rediff it against their git tree. I did that and sent patches back. No reply since then. And mind you, the patch is not trying to do anything complex, it mostly moves code around, removes

Re: [PATCH] MAINTAINERS: remove Adam Fritzler, update his email address in other sources

2007-12-18 Thread Matthew Wilcox
On Mon, Dec 17, 2007 at 08:48:03PM -0800, Joe Perches wrote: diff --git a/MAINTAINERS b/MAINTAINERS index 9507b42..690f172 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3758,13 +3758,6 @@ W: http://www.kernel.org/pub/linux/kernel/people/bunk/trivial/ T: git

Re: [Lsf] [Lsf-pc] [LSF/MM TOPIC] Generic page-pool recycle facility?

2016-04-11 Thread Matthew Wilcox
On Mon, Apr 11, 2016 at 02:08:27PM +0100, Mel Gorman wrote: > On Mon, Apr 11, 2016 at 02:26:39PM +0200, Jesper Dangaard Brouer wrote: > > On arch's like PowerPC, the DMA API is the bottleneck. To workaround > > the cost of DMA calls, NIC driver alloc large order (compound) pages. > > (dma_map

RE: [PATCH 1/2] include: Fix checkpatch whitespace error and warning

2017-02-12 Thread Matthew Wilcox
Don't worry about this file; I have a complete rewrite already queued. > -Original Message- > From: Tobin C. Harding [mailto:m...@tobin.cc] > Sent: Saturday, February 11, 2017 9:58 PM > To: David S . Miller <da...@davemloft.net> > Cc: Matthew Wilcox <mawil..

in_irq_or_nmi()

2017-03-27 Thread Matthew Wilcox
On Mon, Mar 27, 2017 at 05:15:00PM +0200, Jesper Dangaard Brouer wrote: > And I also verified it worked: > > 0.63 │ mov__preempt_count,%eax >│ free_hot_cold_page(): > 1.25 │ test $0x1f,%eax >│ ↓ jne1e4 > > And this simplification also made

Re: in_irq_or_nmi()

2017-03-29 Thread Matthew Wilcox
On Wed, Mar 29, 2017 at 11:19:49AM +0200, Peter Zijlstra wrote: > On Wed, Mar 29, 2017 at 10:59:28AM +0200, Jesper Dangaard Brouer wrote: > > On Wed, 29 Mar 2017 10:12:19 +0200 > > Peter Zijlstra wrote: > > > No, that's horrible. Also, wth is this about? A memory allocator

Re: Page allocator order-0 optimizations merged

2017-03-27 Thread Matthew Wilcox
On Mon, Mar 27, 2017 at 02:39:47PM +0200, Jesper Dangaard Brouer wrote: > > +static __always_inline int in_irq_or_nmi(void) > +{ > + return in_irq() || in_nmi(); > +// XXX: hoping compiler will optimize this (todo verify) into: > +// #define in_irq_or_nmi() (preempt_count() & (HARDIRQ_MASK

Re: [PATCH 00/12] radix-tree: split out struct radix_tree_root out to

2017-10-10 Thread Matthew Wilcox
On Tue, Oct 10, 2017 at 09:56:22PM +0900, Masahiro Yamada wrote: > One refactoring alone does not produce much benefits, > but making continuous efforts will disentangle the knotted threads. > Of course, this might be a pipe dream... A lot of people have had that dream, and some of those

Re: [PATCH 00/12] radix-tree: split out struct radix_tree_root out to

2017-10-10 Thread Matthew Wilcox
On Mon, Oct 09, 2017 at 01:10:01AM +0900, Masahiro Yamada wrote: > Reducing the header dependency will help for speeding the kernel > build, suppressing unnecessary recompile of objects during > git-bisect'ing, etc. Well, does it? You could provide measurements showing before/after time to

Extended IDR API

2017-09-11 Thread Matthew Wilcox
you have any plans to add test cases? (Compile tested only; I'm at a conference. Also, I didn't check the kerneldoc because I don't have Sphinx installed on my laptop.) >From ff45b2a6806cd0e4177c5a10f26c97999164c10c Mon Sep 17 00:00:00 2001 From: Matthew Wilcox <mawil...@microsoft.com>

[PATCH 11/17] cls_bpf: Convert to use idr_alloc_u32

2017-11-28 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> Use the new helper. This has a modest reduction in both lines of code and compiled code size. Signed-off-by: Matthew Wilcox <mawil...@microsoft.com> --- net/sched/cls_bpf.c | 24 ++-- 1 file changed, 10 inser

[PATCH 00/17] IDR patches for 4.15

2017-11-28 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> The patches here are of three types: - Enhancing the test suite (fixing the build, adding a couple of new tests, fixing a bug in the test) - Replacing the 'extended' IDR API - Fixing some low-probability bugs As far as the 'extended' I

[PATCH 07/17] idr: Delete idr_find_ext function

2017-11-28 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> Simply changing idr_remove's 'id' argument to 'unsigned long' works for all callers. Signed-off-by: Matthew Wilcox <mawil...@microsoft.com> --- include/linux/idr.h| 7 +-- net/sched/act_api.c| 2 +- net/sched/cls_flower.c | 2

[PATCH 08/17] idr: Add idr_alloc_u32 helper

2017-11-28 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> All current users of idr_alloc_ext() actually want to allocate a u32 and it's a little painful for them to use idr_alloc_ext(). This convenience function makes it simple. Signed-off-by: Matthew Wilcox <mawil...@microsoft.com> --- i

[PATCH 13/17] cls_u32: Reinstate cyclic allocation

2017-11-28 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> Commit e7614370d6f0 ("net_sched: use idr to allocate u32 filter handles) converted htid allocation to use the IDR. The ID allocated by this scheme changes; it used to be cyclic, but now always allocates the lowest available. The IDR supp

[PATCH 05/17] idr: Delete idr_remove_ext function

2017-11-28 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> Simply changing idr_remove's 'id' argument to 'unsigned long' suffices for all callers. Signed-off-by: Matthew Wilcox <mawil...@microsoft.com> --- include/linux/idr.h| 7 +-- net/sched/act_api.c| 2 +- net/sched/cls_

[PATCH 17/17] idr: Warn if old iterators see large IDs

2017-11-28 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> Now that the IDR can be used to store large IDs, it is possible somebody might only partially convert their old code and use the iterators which can only handle IDs up to INT_MAX. It's probably unwise to show them a truncated ID, so

[PATCH 15/17] idr: Rename idr_alloc_ext to idr_alloc_ul

2017-11-28 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> idr_alloc_ul fits better with other parts of the Linux kernel where we need to name a function based on the types it operates on. It uses a 'nextid' pointer argument instead of separate minimum ID and output assigned ID, (like idr_get_next), re

[PATCH 12/17] cls_flower: Convert to idr_alloc_u32

2017-11-28 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> Use the new helper which saves a temporary variable and a few lines of code. Signed-off-by: Matthew Wilcox <mawil...@microsoft.com> --- net/sched/cls_flower.c | 26 ++ 1 file changed, 10 insertions(+), 16 deleti

[PATCH 02/17] radix tree test suite: Remove ARRAY_SIZE

2017-11-28 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> This is now defined in tools/include/linux/kernel.h, so our definition generates a warning. Signed-off-by: Matthew Wilcox <mawil...@microsoft.com> --- tools/testing/radix-tree/linux/kernel.h | 2 -- 1 file changed, 2 deletions(-) diff -

[PATCH 06/17] idr: Delete idr_replace_ext function

2017-11-28 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> Changing idr_replace's 'id' argument to 'unsigned long' works for all callers. Callers which passed a negative ID now get -ENOENT instead of -EINVAL. No callers relied on this error value. Signed-off-by: Matthew Wilcox <mawil...@micr

[PATCH 10/17] cls_basic: Convert to use idr_alloc_u32

2017-11-28 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> Use the new helper which saves a temporary variable and a few lines of code. Signed-off-by: Matthew Wilcox <mawil...@microsoft.com> --- net/sched/cls_basic.c | 25 ++--- 1 file changed, 10 insertions(+), 15 deleti

[PATCH 14/17] cls_u32: Convert to idr_alloc_u32

2017-11-28 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> No real benefit to this classifier, but since we're allocating a u32 anyway, we should use this function. Signed-off-by: Matthew Wilcox <mawil...@microsoft.com> --- net/sched/cls_u32.c | 7 +++ 1 file changed, 3 insertions(+),

[PATCH 04/17] IDR test suite: Check handling negative end correctly

2017-11-28 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> One of the charming quirks of the idr_alloc() interface is that you can pass a negative end and it will be interpreted as "maximum". Ensure we don't break that. Signed-off-by: Matthew Wilcox <mawil...@microsoft.com> --- tools/

[PATCH 03/17] idr test suite: Fix ida_test_random()

2017-11-28 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> The test was checking the wrong errno; ida_get_new_above() returns EAGAIN, not ENOMEM on memory allocation failure. Double the number of threads to increase the chance that we actually exercise this path during the test suite (it was a bit sp

[PATCH 16/17] idr: Rename idr_for_each_entry_ext

2017-11-28 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> Match idr_alloc_ul with idr_get_next_ul and idr_for_each_entry_ul. Also add kernel-doc. Signed-off-by: Matthew Wilcox <mawil...@microsoft.com> --- include/linux/idr.h | 17 ++--- lib/idr.c | 20 +++

[PATCH 01/17] idr: Fix build

2017-11-28 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> The IDR calls WARN_ON without including Signed-off-by: Matthew Wilcox <mawil...@microsoft.com> --- include/linux/idr.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/idr.h b/include/linux/idr.h index 7c3a365f7e12..

Re: [PATCH 11/17] cls_bpf: Convert to use idr_alloc_u32

2017-11-29 Thread Matthew Wilcox
On Tue, Nov 28, 2017 at 05:08:40PM -0800, Jakub Kicinski wrote: > On Tue, 28 Nov 2017 13:33:06 -0800, Matthew Wilcox wrote: > > + ret = idr_alloc_u32(>handle_idr, prog, , > > + INT_MAX, GFP_KERNEL); > >

[PATCH 09/17] net sched actions: Convert to use idr_alloc_u32

2017-11-28 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> Use the new helper. Also untangle the error path, and in so doing noticed that estimator generator failure would lead to us leaking an ID. Fix that bug. Signed-off-by: Matthew Wilcox <mawil...@microsoft.com> --- net/sched/ac

[PATCH v2 00/17] IDR changes for v4.15-rc1

2017-11-29 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> v2: - Rebased on f6454f80e8a965fca203dab28723f68ec78db608 to resolve conflicting changes with cls_bpf - Fix whitespace - Change a WARN_ON to WARN_ON_ONCE (git snafu yesterday) Original cover letter: The patches here are of three

[PATCH v2 02/17] radix tree test suite: Remove ARRAY_SIZE

2017-11-29 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> This is now defined in tools/include/linux/kernel.h, so our definition generates a warning. Signed-off-by: Matthew Wilcox <mawil...@microsoft.com> --- tools/testing/radix-tree/linux/kernel.h | 2 -- 1 file changed, 2 deletions(-) diff -

[PATCH v2 03/17] idr test suite: Fix ida_test_random()

2017-11-29 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> The test was checking the wrong errno; ida_get_new_above() returns EAGAIN, not ENOMEM on memory allocation failure. Double the number of threads to increase the chance that we actually exercise this path during the test suite (it was a bit sp

[PATCH v2 09/17] net sched actions: Convert to use idr_alloc_u32

2017-11-29 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> Use the new helper. Also untangle the error path, and in so doing noticed that estimator generator failure would lead to us leaking an ID. Fix that bug. Signed-off-by: Matthew Wilcox <mawil...@microsoft.com> --- net/sched/ac

[PATCH v2 01/17] idr: Fix build

2017-11-29 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> The IDR calls WARN_ON without including Signed-off-by: Matthew Wilcox <mawil...@microsoft.com> --- include/linux/idr.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/idr.h b/include/linux/idr.h index 7c3a365f7e12..

[PATCH v2 10/17] cls_basic: Convert to use idr_alloc_u32

2017-11-29 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> Use the new helper which saves a temporary variable and a few lines of code. Signed-off-by: Matthew Wilcox <mawil...@microsoft.com> --- net/sched/cls_basic.c | 25 ++--- 1 file changed, 10 insertions(+), 15 deleti

[PATCH v2 12/17] cls_flower: Convert to idr_alloc_u32

2017-11-29 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> Use the new helper which saves a temporary variable and a few lines of code. Signed-off-by: Matthew Wilcox <mawil...@microsoft.com> --- net/sched/cls_flower.c | 26 ++ 1 file changed, 10 insertions(+), 16 deleti

[PATCH v2 11/17] cls_bpf: Convert to use idr_alloc_u32

2017-11-29 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> Use the new helper. This has a modest reduction in both lines of code and compiled code size. Signed-off-by: Matthew Wilcox <mawil...@microsoft.com> --- net/sched/cls_bpf.c | 24 ++-- 1 file changed, 10 inser

[PATCH v2 07/17] idr: Delete idr_find_ext function

2017-11-29 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> Simply changing idr_remove's 'id' argument to 'unsigned long' works for all callers. Signed-off-by: Matthew Wilcox <mawil...@microsoft.com> --- include/linux/idr.h| 7 +-- net/sched/act_api.c| 2 +- net/sched/cls_flower.c | 2

[PATCH v2 17/17] idr: Warn if old iterators see large IDs

2017-11-29 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> Now that the IDR can be used to store large IDs, it is possible somebody might only partially convert their old code and use the iterators which can only handle IDs up to INT_MAX. It's probably unwise to show them a truncated ID, so

[PATCH v2 16/17] idr: Rename idr_for_each_entry_ext

2017-11-29 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> Match idr_alloc_ul with idr_get_next_ul and idr_for_each_entry_ul. Also add kernel-doc. Signed-off-by: Matthew Wilcox <mawil...@microsoft.com> --- include/linux/idr.h | 17 ++--- lib/idr.c | 20 +++

[PATCH v2 13/17] cls_u32: Reinstate cyclic allocation

2017-11-29 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> Commit e7614370d6f0 ("net_sched: use idr to allocate u32 filter handles) converted htid allocation to use the IDR. The ID allocated by this scheme changes; it used to be cyclic, but now always allocates the lowest available. The IDR supp

[PATCH v2 15/17] idr: Rename idr_alloc_ext to idr_alloc_ul

2017-11-29 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> idr_alloc_ul fits better with other parts of the Linux kernel where we need to name a function based on the types it operates on. It uses a 'nextid' pointer argument instead of separate minimum ID and output assigned ID, (like idr_get_next), re

[PATCH v2 04/17] IDR test suite: Check handling negative end correctly

2017-11-29 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> One of the charming quirks of the idr_alloc() interface is that you can pass a negative end and it will be interpreted as "maximum". Ensure we don't break that. Signed-off-by: Matthew Wilcox <mawil...@microsoft.com> --- tools/

[PATCH v2 08/17] idr: Add idr_alloc_u32 helper

2017-11-29 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> All current users of idr_alloc_ext() actually want to allocate a u32 and it's a little painful for them to use idr_alloc_ext(). This convenience function makes it simple. Signed-off-by: Matthew Wilcox <mawil...@microsoft.com> --- i

[PATCH v2 14/17] cls_u32: Convert to idr_alloc_u32

2017-11-29 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> No real benefit to this classifier, but since we're allocating a u32 anyway, we should use this function. Signed-off-by: Matthew Wilcox <mawil...@microsoft.com> --- net/sched/cls_u32.c | 7 +++ 1 file changed, 3 insertions(+),

[PATCH v2 05/17] idr: Delete idr_remove_ext function

2017-11-29 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> Simply changing idr_remove's 'id' argument to 'unsigned long' suffices for all callers. Signed-off-by: Matthew Wilcox <mawil...@microsoft.com> --- include/linux/idr.h| 7 +-- net/sched/act_api.c| 2 +- net/sched/cls_

[PATCH v2 06/17] idr: Delete idr_replace_ext function

2017-11-29 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> Changing idr_replace's 'id' argument to 'unsigned long' works for all callers. Callers which passed a negative ID now get -ENOENT instead of -EINVAL. No callers relied on this error value. Signed-off-by: Matthew Wilcox <mawil...@micr

Re: [PATCH net-next 2/2] ncpfs: move net/ncpfs to drivers/staging/ncpfs

2017-11-14 Thread Matthew Wilcox
On Sun, Nov 12, 2017 at 11:22:27AM -0800, Stephen Hemminger wrote: > The Netware Core Protocol is a file system that talks to > Netware clients over IPX. Since IPX has been dead for many years > move the file system into staging for eventual interment. Should probably cc Petr on this ... (added)

[PATCH 2/2] Remove percpu_ida

2018-05-15 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> With its one user gone, remove the library code. Signed-off-by: Matthew Wilcox <mawil...@microsoft.com> --- include/linux/percpu_ida.h | 83 lib/Makefile | 2 +- lib/percpu_ida.c

[PATCH 1/2] Convert target drivers to use sbitmap

2018-05-15 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> The sbitmap and the percpu_ida perform essentially the same task, allocating tags for commands. Since the sbitmap is more used than the percpu_ida, convert the percpu_ida users to the sbitmap API. Signed-off-by: Matthew Wilcox

[PATCH 0/2] Use sbitmap instead of percpu_ida

2018-05-15 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> This is a pretty rough-and-ready conversion of the target drivers from using percpu_ida to sbitmap. It compiles; I don't have a target setup, so it's completely untested. I haven't tried to do anything particularly clever here, so it's po

Re: kmem_cache_attr (was Re: [PATCH 04/36] usercopy: Prepare for usercopy whitelisting)

2018-01-16 Thread Matthew Wilcox
On Tue, Jan 16, 2018 at 12:17:01PM -0600, Christopher Lameter wrote: > Draft patch of how the data structs could change. kmem_cache_attr is read > only. Looks good. Although I would add Kees' user feature: struct kmem_cache_attr { char name[16]; unsigned int size;

Re: [PATCH 13/38] ext4: Define usercopy region in ext4_inode_cache slab cache

2018-01-14 Thread Matthew Wilcox
On Thu, Jan 11, 2018 at 03:05:14PM -0800, Kees Cook wrote: > On Thu, Jan 11, 2018 at 9:01 AM, Theodore Ts'o wrote: > > On Wed, Jan 10, 2018 at 06:02:45PM -0800, Kees Cook wrote: > >> The ext4 symlink pathnames, stored in struct ext4_inode_info.i_data > >> and therefore contained in

Re: kmem_cache_attr (was Re: [PATCH 04/36] usercopy: Prepare for usercopy whitelisting)

2018-01-16 Thread Matthew Wilcox
On Tue, Jan 16, 2018 at 10:54:27AM -0600, Christopher Lameter wrote: > On Tue, 16 Jan 2018, Matthew Wilcox wrote: > > > I think that's a good thing! /proc/slabinfo really starts to get grotty > > above 16 bytes. I'd like to chop off "_cache" from the n

Re: kmem_cache_attr (was Re: [PATCH 04/36] usercopy: Prepare for usercopy whitelisting)

2018-01-16 Thread Matthew Wilcox
On Tue, Jan 16, 2018 at 09:21:30AM -0600, Christopher Lameter wrote: > > struct kmem_cache_attr { > > const char name[32]; > > Want to avoid the string reference mess that occurred in the past? > Is that really necessary? But it would limit the size of the name. I think that's a good thing!

Re: [PATCH 04/36] usercopy: Prepare for usercopy whitelisting

2018-01-14 Thread Matthew Wilcox
On Wed, Jan 10, 2018 at 12:28:23PM -0600, Christopher Lameter wrote: > On Tue, 9 Jan 2018, Kees Cook wrote: > > +struct kmem_cache *kmem_cache_create_usercopy(const char *name, > > + size_t size, size_t align, slab_flags_t flags, > > + size_t useroffset, size_t

Re: Fwd: Re: Kernel panic with 4.16-rc1 (and 4.16-rc2) running selftest

2018-02-23 Thread Matthew Wilcox
On Sat, Feb 24, 2018 at 01:49:35AM +, Chris Mi wrote: > To verify this patch, the following is a sanity test case: > > # tc qdisc delete dev $link ingress > /dev/null 2>&1; > # tc qdisc add dev $link ingress; > # tc filter add dev $link prio 1 protocol ip handle 0x8001 parent : >

Re: Fwd: Re: Kernel panic with 4.16-rc1 (and 4.16-rc2) running selftest

2018-02-23 Thread Matthew Wilcox
On Fri, Feb 23, 2018 Randy Dunlap wrote: > [add Matthew Wilcox; hopefully he can look/see] Thanks, Randy. I don't understand why nobody else thought to cc the author of the patch that it was bisected to ... > On 02/23/2018 04:13 PM, Cong Wang wrote: > > On Fri, Feb 23, 2018 at 3

Re: tcp_bind_bucket is missing from slabinfo

2018-02-24 Thread Matthew Wilcox
On Fri, Feb 23, 2018 at 10:50:30PM -0800, Stephen Hemminger wrote: > Somewhere back around 3.17 the kmem cache "tcp_bind_bucket" dropped out > of /proc/slabinfo. It turns out the ss command was dumpster diving > in slabinfo to determine the number of bound sockets and now it always > reports 0. >

Re: [PATCH 0/2] mark some slabs as visible not mergeable

2018-02-24 Thread Matthew Wilcox
erefore this patch set adds a flag to slab to give another > reason to prevent merging, and then uses it in network code. This is exactly the solution I would have suggested. Note that SLUB has always had slab merging, so this tool has been broken since 2.6.22 on any kernel with CONFIG_SLUB.

[GIT PULL] Fixes for IDR

2018-02-26 Thread Matthew Wilcox
14:39:30 -0500) Matthew Wilcox (2): radix tree test suite: Fix build idr: Fix handling of IDs above INT_MAX lib/idr.c | 13 --- tools/testing/radix-tree/idr-test.c

Re: rfc: remove print_vma_addr ? (was Re: [PATCH 00/16] remove eight obsolete architectures)

2018-03-15 Thread Matthew Wilcox
On Thu, Mar 15, 2018 at 09:56:46AM -0700, Joe Perches wrote: > I have a patchset that creates a vsprintf extension for > print_vma_addr and removes all the uses similar to the > print_symbol() removal. > > This now avoids any possible printk interleaving. > > Unfortunately, without some #ifdef

[RFC 1/2] mm: Use page->mapping to indicate pfmemalloc

2018-03-15 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> I want to use page->index for a different purpose, so move the pfmemalloc indicator from page->index to page->mapping. Signed-off-by: Matthew Wilcox <mawil...@microsoft.com> --- include/linux/mm.h | 16 +--- mm

[RFC 0/2] Shrink page_frag_cache

2018-03-15 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> I've just learned about the page_frag_cache allocator, and now I want to use it everywhere ;-) But before I start using it in other places, I want to see if it can be improved at all. The pfmemalloc flag is pretty specific to how the network

[RFC 2/2] page_frag_cache: Store metadata in struct page

2018-03-15 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> Shrink page_frag_cache from 24 to 8 bytes (a single pointer to the currently-in-use struct page) by using the page's refcount directly (instead of maintaining a bias) and storing our current progress through the page in the same bits currentl

Re: [PATCH] mlx5: Remove call to ida_pre_get

2018-03-15 Thread Matthew Wilcox
On Thu, Mar 15, 2018 at 11:58:07PM +, Saeed Mahameed wrote: > On Wed, 2018-03-14 at 19:57 -0700, Matthew Wilcox wrote: > > From: Matthew Wilcox <mawil...@microsoft.com> > > > > The mlx5 driver calls ida_pre_get() in a loop for no readily apparent > > reason

[PATCH] mlx5: Remove call to ida_pre_get

2018-03-14 Thread Matthew Wilcox
From: Matthew Wilcox <mawil...@microsoft.com> The mlx5 driver calls ida_pre_get() in a loop for no readily apparent reason. The driver uses ida_simple_get() which will call ida_pre_get() by itself and there's no need to use ida_pre_get() unless using ida_get_new(). Signed-off-by: Matthew

Re: [PATCH] kvmalloc: always use vmalloc if CONFIG_DEBUG_VM

2018-04-20 Thread Matthew Wilcox
On Fri, Apr 20, 2018 at 04:54:53PM -0400, Mikulas Patocka wrote: > On Fri, 20 Apr 2018, Michal Hocko wrote: > > No way. This is just wrong! First of all, you will explode most likely > > on many allocations of small sizes. Second, CONFIG_DEBUG_VM tends to be > > enabled quite often. > > You're an

Re: [PATCH] kvmalloc: always use vmalloc if CONFIG_DEBUG_VM

2018-04-21 Thread Matthew Wilcox
On Fri, Apr 20, 2018 at 05:21:26PM -0400, Mikulas Patocka wrote: > On Fri, 20 Apr 2018, Matthew Wilcox wrote: > > On Fri, Apr 20, 2018 at 04:54:53PM -0400, Mikulas Patocka wrote: > > > On Fri, 20 Apr 2018, Michal Hocko wrote: > > > > No way. This is just wrong! First

Re: [PATCH] kvmalloc: always use vmalloc if CONFIG_DEBUG_VM

2018-04-20 Thread Matthew Wilcox
On Thu, Apr 19, 2018 at 12:12:38PM -0400, Mikulas Patocka wrote: > Unfortunatelly, some kernel code has bugs - it uses kvmalloc and then > uses DMA-API on the returned memory or frees it with kfree. Such bugs were > found in the virtio-net driver, dm-integrity or RHEL7 powerpc-specific > code.

Re: [PATCH] kvmalloc: always use vmalloc if CONFIG_DEBUG_VM

2018-04-20 Thread Matthew Wilcox
On Fri, Apr 20, 2018 at 03:08:52PM +0200, Michal Hocko wrote: > > In order to detect these bugs reliably I submit this patch that changes > > kvmalloc to always use vmalloc if CONFIG_DEBUG_VM is turned on. > > No way. This is just wrong! First of all, you will explode most likely > on many

  1   2   >