pppoe in 2.4.0
Hello, Does anyone have pppoe working with 2.4.0? I'm running 2.4.0-ac9 with ppp and pppoe compiled into the kernel (I've tried with modules too) The pppd simply refuses to acknowlege the presence of ppp support in the kernel. The last release of pppd was in august 2000. Was this before the ppp interface in the kernel was overhauled? mh -- Martin Hicks || [EMAIL PROTECTED] Use PGP/GnuPG || DSS PGP Key: 0x4C7F2BEE Beer: So much more than just a breakfast drink. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: pppoe in 2.4.0
Thank you all. I was silly and didn't create the /dev/ppp device. On 19 Jan 2001 07:10:30 +0100, Ian Macdonald wrote: > On 19 Jan 2001 03:51:20 +0100 in caliban.linux.kernel, you wrote: > > >Does anyone have pppoe working with 2.4.0? > > > >I'm running 2.4.0-ac9 with ppp and pppoe compiled into the kernel (I've > >tried with modules too) > > > >The pppd simply refuses to acknowlege the presence of ppp support in the > >kernel. > >The last release of pppd was in august 2000. Was this before the ppp > >interface in the > >kernel was overhauled? > > Have you aliased the new module name to ppp? > > I'm using pppd just for simple dial-up from home, but I needed to add > the following line to /etc/modules.conf before pppd would load the > correct module: > > alias ppp ppp_async > > However, I couldn't get PPP to work when I compiled it directly into > the kernel. > > Ian > -- > Ian Macdonald | "Language shapes the way we think, and > Senior System Administrator | determines what we can think about." -- B. > Linuxcare, Inc. | L. Whorf > Support for the Revolution | > | > - > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to [EMAIL PROTECTED] > Please read the FAQ at http://www.tux.org/lkml/ -- Martin Hicks || [EMAIL PROTECTED] Use PGP/GnuPG || DSS PGP Key: 0x4C7F2BEE Beer: So much more than just a breakfast drink. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
2.2.18pre17: usb-uhci verbosity
I moved from 2.2.18pre15 to 2.2.18pre17 and now I get the following usb-uhci stuff being spewed to my terminal: Oct 20 20:54:19 plato kernel: usb-uhci.c: interrupt, status 3, frame# 704 Oct 20 20:54:20 plato kernel: usb-uhci.c: interrupt, status 3, frame# 1088 Oct 20 20:54:20 plato kernel: usb-uhci.c: interrupt, status 3, frame# 1472 Oct 20 20:54:20 plato kernel: usb-uhci.c: interrupt, status 3, frame# 1856 Everything seems to be functioning correctly though. Reason? thanks mh -- Martin Hicks || [EMAIL PROTECTED] Use PGP/GnuPG || DSS PGP Key: 0x4C7F2BEE Beer: So much more than just a breakfast drink. PGP signature
2.4 and PPPoE problem
Hello, I'm using PPPoE with an i586 machine running 2.4.2. The machine connects fine and allows network traffic to pass through the link. However, certain websites seem to choke. (notable ones are www.chapters.ca and www.hp.com) Using Lynx or Netscape I get the same results, a few bytes of traffic are received and then nothing (eventually the connection times out). The same does not happen in windows. (ugh) I have not encountered any machine that I have telnet/ftp/ssh access to that breaks in this way so I can only confirm that http traffic is not working. This gateway machine does masquerading, and internal machines and the external machine react the same way. TIA mh Here is some useful info: mort@galileo:~$ uname -a Linux galileo 2.4.2 #4 Thu Feb 22 14:13:23 EST 2001 i586 unknown mort@galileo:~$ /sbin/ifconfig ppp0 ppp0 Link encap:Point-to-Point Protocol inet addr:209.217.122.37 P-t-P:209.217.122.1 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1480 Metric:1 RX packets:1272056 errors:0 dropped:0 overruns:0 frame:0 TX packets:1476697 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:3 RX bytes:430171737 (410.2 Mb) TX bytes:1260803415 (1202.3 Mb) mort@galileo:~$ /sbin/route Kernel IP routing table Destination Gateway Genmask Flags Metric RefUse Iface magma * 255.255.255.255 UH0 00 ppp0 192.168.69.0* 255.255.255.0 U 0 00 eth0 default magma 0.0.0.0 UG0 00 ppp0 -- Martin Hicks || [EMAIL PROTECTED] Use PGP/GnuPG || DSS PGP Key: 0x4C7F2BEE Beer: So much more than just a breakfast drink. PGP signature
Re: 2.4 and PPPoE problem
Yes...my MTU on ppp0 was to high. Thanks. mh On Mon, Mar 12, 2001 at 10:06:15PM +0200, mulix wrote: > hi, > > you might want to check your mtu and mru values on both the external > interface (i assume you are using an ADSL modem, from your usage of > PPPoE, so that will be eth0) and the internal interface (ppp0). the mtu > and mru values on the internal interface should be a bit less than those > on the external interface, to work around modem bugs. > > here in israel, an MTU value of 1500 for the external interface and 1452 > for the internal (1452) seems to work fine and solve a problem which > sounds exactly like yours. > > On Mon, 12 Mar 2001, Martin Hicks wrote: > > > The machine connects fine and allows network traffic to pass > > through the link. > > > > However, certain websites seem to choke. > > (notable ones are www.chapters.ca and www.hp.com) > > > > Using Lynx or Netscape I get the same results, a few bytes of > > traffic are received and then nothing (eventually the connection > > times out). > > -- > mulix > http://www.advogato.com/person/mulix > > linux/reboot.h: #define LINUX_REBOOT_MAGIC1 0xfee1dead > -- Martin Hicks || [EMAIL PROTECTED] Use PGP/GnuPG || DSS PGP Key: 0x4C7F2BEE Beer: So much more than just a breakfast drink. PGP signature
Re: [PATCH] meminfo: add Cached underflow check
On Mon, Apr 04, 2005 at 03:10:49PM -0700, Andrew Morton wrote: > Martin Hicks <[EMAIL PROTECTED]> wrote: > > > > Working on some code lately I've been getting huge values > > for "Cached". The cause is that get_page_cache_size() is an > > approximate value, and for a sufficiently small returned value > > of get_page_cache_size() the value underflows. > > OK.. > > I think I'd prefer to do it this way - it's simpler and the original patch > had a teeny race wrt changes in total_swapcache_pages. Fine by me. mh -- Martin Hicks || Silicon Graphics Inc. || [EMAIL PROTECTED] - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] VM: add vm.free_node_memory sysctl
On Fri, Aug 05, 2005 at 11:48:58PM +0200, Andi Kleen wrote: > On Fri, Aug 05, 2005 at 12:45:58PM -0500, Ray Bryant wrote: > > > discarded. I think what Martin and I would prefer to see is an interface > > that allows one to just get rid of the clean page cache (or at least enough > > of it) so that additional mapped page allocations will occur locally to the > > node without causing swapping. > > That seems like a very special narrow case. But have you tried if memhog > really doesn't work this way? Yes. This *is* a very special narrow case. This doesn't really apply to a desktop machine, nor to a normal unix server load. It *does* apply to cleaning up a node (or set of nodes) before running HPC apps which really need to get local memory to perform correctly. I'm not suggesting that this is something useful for your average computer, but it is a feature that would make life a lot easier on big machines running HPC apps. The memhog approach works, but it may negatively impact the performance of other jobs on the same node (by swapping or needlessly forcing the node into memory reclaim and dirty page writeback). > > > > AFAIK, the number of mapped pages on the node is not exported to user space > > (by, for example, /sys). So there is no good way to size the "slop" to > > allow for an existing allocation. If there was, then using a bound memory > > hog would likely be a reasonable replacement for Martin's syscall to > > release > > all free page cache, at least for small to medium sized sized systems. > > I guess it could be exported without too much trouble. I did this to test out the memhog method. > > The reason we ended up with a sysctl/syscall (to control the aggressiveness > > with which __alloc_pages will try to free page cache before spilling) is > > that > > deciding whether or not to spend the effort to free up page cache pages on > > the local node before spilling is a workload dependent optimization. For > > an HPC application it is typically worth the effort to try to free local > > node page cache before spilling off node because the program will run > > sufficiently long to make the improvement due to getting local storage > > dominates the extra cost of doing the page allocation. For file server > > workloads, for example, it is typically important to minimize the time to > > do > > the page allocation; if it turns out to be on a remote node it really > > doesn't > > matter that much. So it seems to me that we need some way for the > > application to tell the system which approach it prefers based on the type > > of > > workload it is -- hence the sysctl or syscall approach. > > Ideally it should just work transparently. Maybe NUMA allocation > should be a bit more aggressive at cleaning local pages before fallback. > Problem is that it potentially makes the fast path slow. This is what we need: a better level of control over how NUMA allocations work. In some cases we *really* would prefer local pages, even at the cost of page cache. It does have the potential to make the fast path slower. Some workloads are willing to make this sacrifice. mh -- Martin Hicks || Silicon Graphics Inc. || [EMAIL PROTECTED] - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] vm: slab.c spelling correction
as the Subject says... -- Martin Hicks || Silicon Graphics Inc. || [EMAIL PROTECTED] Fix a small spelling mistake. subtile->subtle Signed-off-by: Martin Hicks <[EMAIL PROTECTED]> --- commit fde14c4f6598615c97ec36dc327ec357044d50a1 tree 7d34f622a36d0920e6d77f2adfbe19b5501b9e76 parent ec3f303ed39a1fa9f66828bfa2d248b2e697544a author Martin Hicks,,,engr <[EMAIL PROTECTED]> Mon, 15 Aug 2005 09:27:24 -0700 committer Martin Hicks,,,engr <[EMAIL PROTECTED]> Mon, 15 Aug 2005 09:27:24 -0700 mm/slab.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/mm/slab.c b/mm/slab.c --- a/mm/slab.c +++ b/mm/slab.c @@ -600,7 +600,7 @@ static inline kmem_cache_t *__find_gener csizep++; /* -* Really subtile: The last entry with cs->cs_size==ULONG_MAX +* Really subtle: The last entry with cs->cs_size==ULONG_MAX * has cs_{dma,}cachep==NULL. Thus no special case * for large kmalloc calls required. */ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] pgtables: fix GFP_KERNEL allocation with preempt disabled
Hi Andrew, This is a fix to the pgtable_quicklist code. There is a GFP_KERNEL allocation in pgtable_quicklist_alloc(), which spews the usual warnings if the kernel is under heavy VM pressure and the reclaim code is invoked. This patch is against 2.6.12-rc2-mm2 Signed-off-by: Martin Hicks <[EMAIL PROTECTED]> Index: linux-2.6.12-rc2.wk/include/asm-ia64/pgalloc.h === --- linux-2.6.12-rc2.wk.orig/include/asm-ia64/pgalloc.h 2005-04-19 09:01:06.0 -0700 +++ linux-2.6.12-rc2.wk/include/asm-ia64/pgalloc.h 2005-04-19 09:53:39.0 -0700 @@ -50,7 +50,7 @@ static inline void *pgtable_quicklist_al ret[0] = 0; --pgtable_quicklist_size; } else { - ret = (unsigned long *)__get_free_page(GFP_KERNEL | __GFP_ZERO); + ret = (unsigned long *)__get_free_page(GFP_ATOMIC | __GFP_ZERO); } preempt_enable(); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] pgtables: fix GFP_KERNEL allocation with preempt disabled
On Tue, Apr 19, 2005 at 11:30:44AM -0700, David S. Miller wrote: > > I think you should really drop the preempt disable during this allocation > instead, that's what we do in the sparc64 quicklist code. > Okay, here's an updated patch. Hi Andrew, This is a fix to the pgtable_quicklist code. There is a GFP_KERNEL allocation in pgtable_quicklist_alloc(), which spews the usual warnings if the kernel is under heavy VM pressure and the reclaim code is invoked. re-enable preempt before we allocate the new page. This patch is against 2.6.12-rc2-mm2 Signed-off-by: Martin Hicks <[EMAIL PROTECTED]> pgalloc.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: linux-2.6.12-rc2.wk/include/asm-ia64/pgalloc.h === --- linux-2.6.12-rc2.wk.orig/include/asm-ia64/pgalloc.h 2005-04-19 10:13:16.0 -0700 +++ linux-2.6.12-rc2.wk/include/asm-ia64/pgalloc.h 2005-04-19 11:40:09.0 -0700 @@ -49,12 +49,12 @@ static inline void *pgtable_quicklist_al pgtable_quicklist = (unsigned long *)(*ret); ret[0] = 0; --pgtable_quicklist_size; + preempt_enable(); } else { + preempt_enable(); ret = (unsigned long *)__get_free_page(GFP_KERNEL | __GFP_ZERO); } - preempt_enable(); - return ret; } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch] remove sys_set_zone_reclaim()
On Mon, Aug 01, 2005 at 09:54:26PM +0200, Ingo Molnar wrote: > > * Andrew Morton <[EMAIL PROTECTED]> wrote: > > > > We could perhaps add a CAP_SYS_ADMIN-only sysctl for this hack, > > > > That would be more appropriate. > > > > (I'm still not sure what happened to the idea of adding a call to > > "clear out this node+zone's pagecache now" rather than "set this > > noed+zone's policy") > > lets do that as a sysctl hack. It would be useful for debugging purposes > anyway. But i'm not sure whether it's the same issue - Martin? (Sorry..I was on vacation yesterday) Yes, this is the same issue with a different way of making it happen. Setting a zone's policy allows reclaim to happen automatically. I'll send in a patch to add a sysctl to do the manual dumping of pagecache really soon. mh -- Martin Hicks || Silicon Graphics Inc. || [EMAIL PROTECTED] - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] VM: add vm.free_node_memory sysctl
On Tue, Aug 02, 2005 at 11:07:46PM +0200, Ingo Molnar wrote: > > * Martin Hicks <[EMAIL PROTECTED]> wrote: > > > On Mon, Aug 01, 2005 at 09:54:26PM +0200, Ingo Molnar wrote: > > > > > > * Andrew Morton <[EMAIL PROTECTED]> wrote: > > > > > > > > We could perhaps add a CAP_SYS_ADMIN-only sysctl for this hack, > > > > > > > > That would be more appropriate. > > > > > > > > (I'm still not sure what happened to the idea of adding a call to > > > > "clear out this node+zone's pagecache now" rather than "set this > > > > noed+zone's policy") > > > > > > lets do that as a sysctl hack. It would be useful for debugging purposes > > > anyway. But i'm not sure whether it's the same issue - Martin? > > > > (Sorry..I was on vacation yesterday) > > > > Yes, this is the same issue with a different way of making it happen. > > Setting a zone's policy allows reclaim to happen automatically. > > > > I'll send in a patch to add a sysctl to do the manual dumping of > > pagecache really soon. > > cool! [ Incidentally, when i found this problem i was looking for > existing bits in the kernel to write such a patch myself (which i wanted > to use on non-NUMA to create more reproducable workloads for > performance-testing) - now i'll wait for your patch. ] Here's the promised sysctl to dump a node's pagecache. Please review! This patch depends on the zone reclaim atomic ops cleanup: http://marc.theaimsgroup.com/?l=linux-mm&m=112307646306476&w=2 I split up zone_reclaim(): - __zone_reclaim() does the Real Work - zone_reclaim() checks the rate-limiting stuff. For the sysctl we don't want to be rate limited. We always want to scan the LRU lists looking for tossable pages. Thanks, mh -- Martin Hicks || Silicon Graphics Inc. || [EMAIL PROTECTED] This patch adds the vm.free_node_memory sysctl. This allows a root user to ask the kernel to drop as many pages as possible out of the specified node's pagecache. Takes a single integer nodeID. e.g., echo 14 > /proc/sys/vm/free_zone_memory will clear pagecache on node 14. Signed-off-by: Martin Hicks <[EMAIL PROTECTED]> --- commit 9b0a83e09e4fea07cf877dc7f6ff8b38c0f48d61 tree 58d5467efa7f3bf103203e25c95c6f0936ed653f parent 414acb15f0f237cbf560bfa56c74ca9d19c5cd5a author Martin Hicks,,,engr <[EMAIL PROTECTED]> Wed, 03 Aug 2005 06:53:33 -0700 committer Martin Hicks,,,engr <[EMAIL PROTECTED]> Wed, 03 Aug 2005 06:53:33 -0700 include/linux/mmzone.h |3 ++ include/linux/sysctl.h |1 + kernel/sysctl.c| 10 +++ mm/vmscan.c| 66 +++- 4 files changed, 68 insertions(+), 12 deletions(-) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -403,6 +403,9 @@ int min_free_kbytes_sysctl_handler(struc extern int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1]; int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *); +extern int sysctl_free_node_memory; +int free_node_memory_sysctl_handler(struct ctl_table *, int, struct file *, + void __user *, size_t *, loff_t *); #include /* Returns the number of the current Node. */ diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -180,6 +180,7 @@ enum VM_VFS_CACHE_PRESSURE=26, /* dcache/icache reclaim pressure */ VM_LEGACY_VA_LAYOUT=27, /* legacy/compatibility virtual address space layout */ VM_SWAP_TOKEN_TIMEOUT=28, /* default time for token time out */ + VM_FREE_NODE_MEMORY=29, /* free page cache from specified node */ }; diff --git a/kernel/sysctl.c b/kernel/sysctl.c --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -851,6 +851,16 @@ static ctl_table vm_table[] = { .strategy = &sysctl_jiffies, }, #endif + { + .ctl_name = VM_FREE_NODE_MEMORY, + .procname = "free_node_memory", + .data = &sysctl_free_node_memory, + .maxlen = sizeof(sysctl_free_node_memory), + .mode = 0644, + .proc_handler = &free_node_memory_sysctl_handler, + .strategy = &sysctl_intvec, + .extra1 = &zero, + }, { .ctl_name = 0 } }; diff --git a/mm/vmscan.c b/mm/vmscan.c --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -33,6 +33,7 @@ #include #include #include +#include #include
Re: [PATCH] VM: add vm.free_node_memory sysctl
On Wed, Aug 03, 2005 at 04:15:29PM +0200, Andi Kleen wrote: > On Wed, Aug 03, 2005 at 09:56:46AM -0400, Martin Hicks wrote: > > > > Here's the promised sysctl to dump a node's pagecache. Please review! > > > > This patch depends on the zone reclaim atomic ops cleanup: > > http://marc.theaimsgroup.com/?l=linux-mm&m=112307646306476&w=2 > > Doesn't numactl --bind=node memhog nodesize-someslack do the same? > > It just might kick in the oom killer if someslack is too small > or someone has unfreeable data there. But then there should be > already an sysctl to turn that one off. Doesn't the memhog hack also cause the machine to swap a lot? The zone_reclaim() path doesn't let the memory reclaim code swap. mh -- Martin Hicks || Silicon Graphics Inc. || [EMAIL PROTECTED] - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] VM: add vm.free_node_memory sysctl
On Wed, Aug 03, 2005 at 04:38:55PM +0200, Andi Kleen wrote: > On Wed, Aug 03, 2005 at 10:24:40AM -0400, Martin Hicks wrote: > > > zone_reclaim() path doesn't let the memory reclaim code swap. > > reclaim with bound policy should only swap on the bound nodemask > (or at least it did when I originally implemented NUMA policy) Yes, it still looks like it only swaps on the bound nodemask. mh -- Martin Hicks || Silicon Graphics Inc. || [EMAIL PROTECTED] - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: bad pgd/pmd in latest BK on ia64
On Mon, Mar 14, 2005 at 02:34:42PM -0800, David S. Miller wrote: > On Mon, 14 Mar 2005 14:06:09 -0800 > "Luck, Tony" <[EMAIL PROTECTED]> wrote: > > > Trying to boot a build of the latest BK on ia64 I see > > a series of messages like this: > > > > mm/memory.c:99: bad pgd e001feba4000. > > mm/memory.c:99: bad pgd e001febac000. > > mm/memory.c:99: bad pgd e001febc0d10. > > Things are similarly busted on sparc64 for me as well. > Things instantly reboot right after the kernel tries > to open an initial console. It's also busted on ia64 in 2.6.11-mm3 if that narrows thing down. mh -- Martin Hicks || Silicon Graphics Inc. || [EMAIL PROTECTED] - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] fix ACPI_BOOT for ia64 (2.6.11-rc3-mm1)
Hi Andrew, One of your patches in 2.6.11-rc3-mm1 breaks ACPI_BOOT for ia64. It removes the dependence on CONFIG_ACPI and makes it exclusively depend on X86_HT, which is wrong. Signed-off-by: Martin Hicks <[EMAIL PROTECTED]> Index: linux-2.6.11-rc3-mm1/drivers/acpi/Kconfig === --- linux-2.6.11-rc3-mm1.orig/drivers/acpi/Kconfig 2005-02-07 12:31:54.0 -0800 +++ linux-2.6.11-rc3-mm1/drivers/acpi/Kconfig 2005-02-08 11:57:04.0 -0800 @@ -42,7 +42,7 @@ config ACPI_BOOT bool - depends on X86_HT + depends on X86_HT || IA64 default y if ACPI - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH/RFC] A method for clearing out page cache
Hi, This patch introduces a new sysctl for NUMA systems that tries to drop as much of the page cache as possible from a set of nodes. The motivation for this patch is for setting up High Performance Computing jobs, where initial memory placement is very important to overall performance. Currently if a job is started and there is page cache lying around on a particular node then allocations will spill onto remote nodes and page cache won't be reclaimed until the whole system is short on memory. This can result in a signficiant performance hit for HPC applications that planned on that memory being allocated locally. This patch is intended to be used to clean out the entire page cache before starting a new job. Ideally, we would like to only clear as much page cache as is required to avoid non-local memory allocation. Patches to do this can be built on top of this patch, so this patch should be regarded as the first step in that direction. The long term goal is to have some mechanism that would better control the page cache (and other memory caches) for machines that put a higher priority on memory placement than maintaining big caches. It allows you to clear page cache on nodes in the following manner: echo 1,3,9-12 > /proc/sys/vm/toss_page_cache_nodes The patch was written by Ray Bryant <[EMAIL PROTECTED]> and forward ported by me, Martin Hicks <[EMAIL PROTECTED]>, to 2.6.11-rc3-mm2. Could we get this included in -mm Andrew? mh -- Martin HicksWild Open Source Inc. [EMAIL PROTECTED] 613-266-2296 This patch introduces a new sysctl for NUMA systems that tries to drop as much of the page cache as possible from a set of nodes. The motivation for this patch is for setting up High Performance Computing jobs, where initial memory placement is very important to overall performance. It allows you to clear page cache on nodes in the following manner: echo 1,3,9-12 > /proc/sys/vm/toss_page_cache_nodes Signed-off-by: Martin Hicks <[EMAIL PROTECTED]> Signed-off-by: Ray Bryant <[EMAIL PROTECTED]> [EMAIL PROTECTED] patches]$ diffstat toss_page_cache_nodes.patch include/linux/sysctl.h |4 + kernel/sysctl.c| 82 +++ mm/vmscan.c| 128 - 3 files changed, 211 insertions(+), 3 deletions(-) Index: linux-2.6.10/include/linux/sysctl.h === --- linux-2.6.10.orig/include/linux/sysctl.h2005-02-11 10:54:13.0 -0800 +++ linux-2.6.10/include/linux/sysctl.h 2005-02-11 10:54:14.0 -0800 @@ -170,6 +170,7 @@ VM_VFS_CACHE_PRESSURE=26, /* dcache/icache reclaim pressure */ VM_LEGACY_VA_LAYOUT=27, /* legacy/compatibility virtual address space layout */ VM_SWAP_TOKEN_TIMEOUT=28, /* default time for token time out */ + VM_TOSS_PAGE_CACHE_NODES=29, /* nodemask_t: nodes to free page cache on */ }; @@ -803,7 +804,8 @@ void __user *, size_t *, loff_t *); extern int proc_doulongvec_ms_jiffies_minmax(ctl_table *table, int, struct file *, void __user *, size_t *, loff_t *); - +extern int proc_dobitmap_list(ctl_table *table, int, struct file *, + void __user *, size_t *, loff_t *); extern int do_sysctl (int __user *name, int nlen, void __user *oldval, size_t __user *oldlenp, void __user *newval, size_t newlen); Index: linux-2.6.10/kernel/sysctl.c === --- linux-2.6.10.orig/kernel/sysctl.c 2005-02-11 10:54:14.0 -0800 +++ linux-2.6.10/kernel/sysctl.c2005-02-11 10:54:14.0 -0800 @@ -41,6 +41,9 @@ #include #include #include +#include +#include +#include #include #include @@ -72,6 +75,12 @@ void __user *, size_t *, loff_t *); #endif +#ifdef CONFIG_NUMA +extern nodemask_t toss_page_cache_nodes; +extern int proc_do_toss_page_cache_nodes(ctl_table *, int, struct file *, +void __user *, size_t *, loff_t *); +#endif + /* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */ static int maxolduid = 65535; static int minolduid; @@ -836,6 +845,16 @@ .strategy = &sysctl_jiffies, }, #endif +#ifdef CONFIG_NUMA + { + .ctl_name = VM_TOSS_PAGE_CACHE_NODES, + .procname = "toss_page_cache_nodes", + .data = &toss_page_cache_nodes, + .maxlen = sizeof(nodemask_t), + .mode = 0644, + .proc_handler = &proc_do_toss_page_cache_nodes, + }, +#endif { .ctl_name = 0 } }; @@ -2071,6 +2090,68 @@ do_proc_dointvec_us
Re: [PATCH/RFC] A method for clearing out page cache
On Mon, Feb 14, 2005 at 07:37:04PM -0800, Paul Jackson wrote: > Questions concerning this page cache patch that Martin submitted, > as a merge of something originally written by Ray Bryant. > > The following patch is not really a patch. It is a few questions, a > couple minor space tweaks, and a never compiled nor tested rewrite of > proc_do_toss_page_cache_nodes() to try to make it look a little > prettier. Thanks for the review Paul. I'll take a harder look at your feedback and reply. -- Martin Hicks || Silicon Graphics Inc. || [EMAIL PROTECTED] - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH/RFC] A method for clearing out page cache
Hi, I've made a bunch of changes that Paul suggested. I've also responded to his concerns further down. Paul correctly pointed out that this patch uses some helper functions that are part of the cpusets patch. I should have mentioned this before. The major changes are: - Cleanup proc_dobitmask_list() a bit more, including adding bounds checking on *lenp. - An important bugfix in vmscan.c around line 390. Go to the keep_locked label, not the "keep" label. - Add locking in proc_do_toss_page_cache_nodes() to protect the global nodemask_t from getting corrupted. - Change a few functions to "static" - Paul Jackson's suggested changes to greatly simplify proc_do_toss_page_cache_nodes() The patch is inlined at the end of the mail. On Mon, Feb 14, 2005 at 07:37:04PM -0800, Paul Jackson wrote: > > 1) A couple of kmalloc's are done using lengths that > so far as I could tell, came straight from user land. Okay, I've stuck in maximums that are based on MAX_NUMNODES. > > 2) Beware that this patch depends on the cpuset patch: > new-bitmap-list-format-for-cpusets.patch > which is still in *-mm only, for the routines > bitmap_scnlistprintf/bitmap_parselist. Thanks. I hadn't realized that. > 3) Should the maxlen of a nodemask for the sysctl > handler for proc_do_toss_page_cache_nodes be the byte > length of the kernels internal binary nodemask, or It is the byte length of the kernel's bitmask struct. > 5) The requirement to read the string in one read(2) syscall > seemed like it might be draconian. If the available But that's the way the rest of the sysctl read functions work. There's no safe way that I can see to ensure that the data doesn't change in between two consecutive read calls. > 9) Comment - dont we need to protect the kernel global variable > toss_page_cache_nodes from simulaneous access by two tasks? yes, I protected this with a semaphore. mh -- Martin HicksWild Open Source Inc. [EMAIL PROTECTED] 613-266-2296 This patch introduces a new sysctl for NUMA systems that tries to drop as much of the page cache as possible from a set of nodes. The motivation for this patch is for setting up High Performance Computing jobs, where initial memory placement is very important to overall performance. Signed-off-by: Martin Hicks <[EMAIL PROTECTED]> Signed-off-by: Ray Bryant <[EMAIL PROTECTED]> [EMAIL PROTECTED] patches]$ diffstat toss_page_cache_nodes_v2.patch include/linux/sysctl.h |3 + kernel/sysctl.c| 95 mm/vmscan.c| 105 - 3 files changed, 201 insertions(+), 2 deletions(-) Index: linux-2.6.10/include/linux/sysctl.h === --- linux-2.6.10.orig/include/linux/sysctl.h2005-02-16 12:43:19.0 -0800 +++ linux-2.6.10/include/linux/sysctl.h 2005-02-19 10:36:41.0 -0800 @@ -170,6 +170,7 @@ VM_VFS_CACHE_PRESSURE=26, /* dcache/icache reclaim pressure */ VM_LEGACY_VA_LAYOUT=27, /* legacy/compatibility virtual address space layout */ VM_SWAP_TOKEN_TIMEOUT=28, /* default time for token time out */ + VM_TOSS_PAGE_CACHE_NODES=29, /* nodemask_t: nodes to free page cache on */ }; @@ -803,6 +804,8 @@ void __user *, size_t *, loff_t *); extern int proc_doulongvec_ms_jiffies_minmax(ctl_table *table, int, struct file *, void __user *, size_t *, loff_t *); +extern int proc_dobitmap_list(ctl_table *table, int, struct file *, + void __user *, size_t *, loff_t *); extern int do_sysctl (int __user *name, int nlen, void __user *oldval, size_t __user *oldlenp, Index: linux-2.6.10/kernel/sysctl.c === --- linux-2.6.10.orig/kernel/sysctl.c 2005-02-16 12:43:19.0 -0800 +++ linux-2.6.10/kernel/sysctl.c2005-02-21 10:49:18.0 -0800 @@ -41,6 +41,8 @@ #include #include #include +#include +#include #include #include @@ -72,6 +74,12 @@ void __user *, size_t *, loff_t *); #endif +#ifdef CONFIG_NUMA +extern nodemask_t toss_page_cache_nodes; +extern int proc_do_toss_page_cache_nodes(ctl_table *, int, struct file *, +void __user *, size_t *, loff_t *); +#endif + /* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */ static int maxolduid = 65535; static int minolduid; @@ -836,6 +844,16 @@ .strategy = &sysctl_jiffies, }, #endif +#ifdef CONFIG_NUMA + { + .ctl_name = VM_TOSS_PA
Re: [PATCH/RFC] A method for clearing out page cache
On Tue, Feb 22, 2005 at 10:45:35AM -0800, Andrew Morton wrote: > Paul Jackson <[EMAIL PROTECTED]> wrote: > > > > As Martin wrote, when he submitted this patch: > > > The motivation for this patch is for setting up High Performance > > > Computing jobs, where initial memory placement is very important to > > > overall performance. > > > > Any left over cache is wrong, for this situation. > > So... Cannot the applicaiton remove all its pagecache with posix_fadvise() > prior to exitting? I think Paul's referring to pagecache (as well as other caches) that are on the node from other uses, not necessarily another HPC job that has recently terminated. mh -- Martin Hicks || Silicon Graphics Inc. || [EMAIL PROTECTED] - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: loading driver automatically & manually
On Tue, Feb 22, 2005 at 06:34:54PM -0800, Anil Kumar wrote: > Hi, > > I am trying to install RHEL 4, 2.6.9-5.EL. I have adaptec 39320 > controller, The install CD already has aic79xx driver in it. The > driver does NOT load for some reason. If I take the same aic79xx > driver source, Create an img and install RHEL4 using linux dd, it > works fine. I'm quite sure you should be contacting RedHat for support with their commercial product. mh -- Martin HicksWild Open Source Inc. [EMAIL PROTECTED] 613-266-2296 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] perthread_pages_alloc cleanup
Hi Andrew, This is just a cleanup - no functional changes. Gets a bunch of code outside an if by returning NULL earlier. -- Martin HicksWild Open Source Inc. [EMAIL PROTECTED] 613-266-2296 Signed-Off-By: Martin Hicks <[EMAIL PROTECTED]> Index: linux-2.6.10/mm/page_alloc.c === --- linux-2.6.10.orig/mm/page_alloc.c 2005-02-25 08:02:33.0 -0800 +++ linux-2.6.10/mm/page_alloc.c2005-02-28 07:08:01.0 -0800 @@ -710,6 +710,7 @@ perthread_pages_alloc(void) { struct list_head *perthread_pages; + struct page *page; /* * try to allocate pages from the per-thread private_pages pool. No @@ -717,18 +718,16 @@ * itself, and not by interrupts or other threads. */ perthread_pages = get_per_thread_pages(); - if (!in_interrupt() && !list_empty(perthread_pages)) { - struct page *page; - - page = list_entry(perthread_pages->next, struct page, lru); - list_del(&page->lru); - current->private_pages_count--; - /* -* per-thread page is already initialized, just return it. -*/ - return page; - } else + if (in_interrupt() || list_empty(perthread_pages)) return NULL; + + page = list_entry(perthread_pages->next, struct page, lru); + list_del(&page->lru); + current->private_pages_count--; + /* +* per-thread page is already initialized, just return it. +*/ + return page; } /* - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] perthread_pages_alloc cleanup
On Mon, Feb 28, 2005 at 09:35:09PM +, Christoph Hellwig wrote: > On Mon, Feb 28, 2005 at 10:52:48AM -0500, Martin Hicks wrote: > > > > Hi Andrew, > > > > This is just a cleanup - no functional changes. Gets a bunch of code > > outside an if by returning NULL earlier. > > the last discussion of that code had the outcome we should just drop > it, probably not worth wasting any time on it. Fair enough. I have no idea with regards to the merit of this code. That detail just bugged me enough to send a patch. mh -- Martin HicksWild Open Source Inc. [EMAIL PROTECTED] 613-266-2296 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Restore PWC driver
On Tue, Mar 08, 2005 at 04:59:38AM -0500, Alan Cox wrote: > On Mon, Mar 07, 2005 at 09:26:43PM -0800, Greg KH wrote: > > > So, who's going to fix up: > > - the MAINTAINERS entry > > - the coding style > > - drop that unneeded changelog file > > - fix the module help text to point to the proper file (or put > > the file in the proper place.) > > - get rid of the c++ crud in the header file > > - drop the "magic" nonsense > > - the ioctls to work on 64bit machines > > ? > > Luc and I'm happy to help doing further work on it. However it's been like > that > in kernel for years so it might also be a good one for the janitors to join in > on ? I'd like to see this driver back in mainline too. Luc, please contact me and we'll get this working correctly on a bunch of machines. mh -- Martin HicksWild Open Source Inc. [EMAIL PROTECTED] 613-266-2296 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] meminfo: add Cached underflow check
Hi, This patch was generated against 2.6.12-rc1 Working on some code lately I've been getting huge values for "Cached". The cause is that get_page_cache_size() is an approximate value, and for a sufficiently small returned value of get_page_cache_size() the value underflows. Signed-off-by: Martin Hicks <[EMAIL PROTECTED]> proc_misc.c |9 - 1 files changed, 8 insertions(+), 1 deletion(-) Index: linux-2.6.11.cached-limit/fs/proc/proc_misc.c === --- linux-2.6.11.cached-limit.orig/fs/proc/proc_misc.c 2005-03-31 11:36:46.0 -0800 +++ linux-2.6.11.cached-limit/fs/proc/proc_misc.c 2005-03-31 11:37:12.0 -0800 @@ -126,6 +126,7 @@ static int meminfo_read_proc(char *page, unsigned long committed; unsigned long allowed; struct vmalloc_info vmi; + unsigned long cached; get_page_state(&ps); get_zone_counts(&active, &inactive, &free); @@ -140,6 +141,12 @@ static int meminfo_read_proc(char *page, allowed = ((totalram_pages - hugetlb_total_pages()) * sysctl_overcommit_ratio / 100) + total_swap_pages; + cached = get_page_cache_size(); + if (total_swapcache_pages+i.bufferram < cached) + cached -= total_swapcache_pages + i.bufferram; + else + cached = 0; + get_vmalloc_info(&vmi); /* @@ -172,7 +179,7 @@ static int meminfo_read_proc(char *page, K(i.totalram), K(i.freeram), K(i.bufferram), - K(get_page_cache_size()-total_swapcache_pages-i.bufferram), + K(cached), K(total_swapcache_pages), K(active), K(inactive), - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/