* 2.5.42-mm2
@ 2002-10-12 6:39 Andrew Morton
2002-10-12 13:19 ` 2.5.42-mm2 Ed Tomlinson
` (3 more replies)
0 siblings, 4 replies; 13+ messages in thread
From: Andrew Morton @ 2002-10-12 6:39 UTC (permalink / raw)
To: lkml, linux-mm
url: http://www.zip.com.au/~akpm/linux/patches/2.5/2.5.42/2.5.42-mm2/
mm1 had a little problem in the compilation department - missing chunk
from fs/fcntl.c.
+fix-pgpgout.patch
Fix /proc/vmstat:pgpgin/pgpgout accounting for 512-byte IOs
+dio-fine-alignment.patch
Bring back the 512-byte alignment patch
+sard.patch
Keep sard ticking over
+remove-kiobufs.patch
Remove the kiobuf infrastructure.
kgdb.patch
oprofile-25.patch
misc.patch
misc
hugetlb-meminfo.patch
change hugetlbpage info in /proc/meminfo
dio-bio-add-fix-1.patch
Fix direct-io for bio_add_page()
net-loopback.patch
Disable second copy in the network loopback driver
swsusp-feature.patch
add shrink_all_memory() for swsusp
large-queue-throttle.patch
Improve writer throttling for small machines
exit-page-referenced.patch
Propagate pte referenced bit into pagecache during unmap
swappiness.patch
swappiness control
mapped-start-active.patch
start anonymous pages on the active list
rename-dirty_async_ratio.patch
rename dirty_async_ratio to dirty_ratio
auto-dirty-memory.patch
adaptive dirty-memory thresholding
batched-slab-asap.patch
batched slab shrinking and shrinker callback API
blkdev-o_direct-short-read.patch
Fix O_DIRECT blockdev reads at end-of-device
fix-pgpgout.patch
Fix block IO accounting for 512-byte requests
orlov-allocator.patch
blk-queue-bounce.patch
inline blk_queue_bounce
lseek-ext2_readdir.patch
remove lock_kernel() from ext2_readdir()
msync-correctness.patch
msync correctness fix
dio-fine-alignment.patch
Allow O_DIRECT to use 512-byte alignment
sard.patch
SARD disk accounting
write-deadlock.patch
Fix the generic_file_write-from-same-mmapped-page deadlock
rd-cleanup.patch
Cleanup and fix the ramdisk driver (doesn't work right yet)
spin-lock-check.patch
spinlock/rwlock checking infrastructure
hugetlb-prefault.patch
hugetlbpages: factor out some code for hugetlbfs
ramfs-aops.patch
Move ramfs address_space ops into libfs
hugetlb-header-split.patch
Move hugetlb declarations into their own header
hugetlbfs.patch
hugetlbfs file system
hugetlb-shm.patch
hugetlbfs backing for SYSV shared memory
page_reserved-accounting.patch
Global PageReserved accounting
use-page_reserved_accounting.patch
Use PG_reserved accounting in the VM
ramfs-prepare-write-speedup.patch
correctness fixes in libfs address_space ops
akpm-deadline.patch
deadline scheduler tweaks
intel-user-copy.patch
Faster copt_*_user for Intel ia32 CPUs
raid0-fix.patch
RAID0 fix
rmqueue_bulk.patch
bulk page allocator
free_pages_bulk.patch
Bulk page freeing function
hot_cold_pages.patch
Hot/Cold pages and zone->lock amortisation
readahead-cold-pages.patch
Use cache-cold pages for pagecache reads.
pagevec-hot-cold-hint.patch
hot/cold hints for truncate and page reclaim
page-reservation.patch
Page reservation API
o_streaming.patch
O_STREAMING support
remove-kiobufs.patch
Remove kiobufs and kiovecs
slab-split-01-rename.patch
slab cleanup: rename static functions
slab-split-02-SMP.patch
slab: enable the cpu arrays on uniprocessor
slab-split-03-tail.patch
slab: reduced internal fragmentation
slab-split-04-drain.patch
slab: take the spinlock in the drain function.
slab-split-05-name.patch
slab: remove spaces from /proc identifiers
slab-split-06-mand-cpuarray.patch
slab: cleanups and speedups
slab-split-07-inline.patch
slab: uninline poisoning checks
slab-split-08-reap.patch
slab: reap timers
cpucache_init-fix.patch
cpucache_init fix
slab-split-10-list_for_each_fix.patch
slab: for a list walking bug
shpte.patch
shpte-ifdef.patch
reduced ifdeffery in the shared pagetable code
shpte-mprotect-fix.patch
fix shared pagetable handling of mprotect
shpte-unmap-fix.patch
shared pagetable unmap fix
shmmap.patch
Proactively share page tables for shared memory
read_barrier_depends.patch
extended barrier primitives
rcu_ltimer.patch
RCU core
dcache_rcu.patch
Use RCU for dcache
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 2.5.42-mm2
2002-10-12 6:39 2.5.42-mm2 Andrew Morton
@ 2002-10-12 13:19 ` Ed Tomlinson
2002-10-12 16:22 ` 2.5.42-mm2 Ingo Oeser
` (2 subsequent siblings)
3 siblings, 0 replies; 13+ messages in thread
From: Ed Tomlinson @ 2002-10-12 13:19 UTC (permalink / raw)
To: Andrew Morton, lkml, linux-mm
Hi,
This builds fine but gets errors in depmod.
make -f arch/i386/lib/Makefile modules_install
if [ -r System.map ]; then /sbin/depmod -ae -F System.map 2.5.42-mm2; fi
depmod: *** Unresolved symbols in /lib/modules/2.5.42-mm2/kernel/fs/ext3/ext3.o
depmod: generic_file_aio_read
depmod: generic_file_aio_write
depmod: *** Unresolved symbols in /lib/modules/2.5.42-mm2/kernel/fs/nfs/nfs.o
depmod: generic_file_aio_read
depmod: generic_file_aio_write
depmod: *** Unresolved symbols in /lib/modules/2.5.42-mm2/kernel/fs/nfsd/nfsd.o
depmod: auth_domain_find
depmod: cache_fresh
depmod: unix_domain_find
depmod: auth_domain_put
depmod: cache_flush
depmod: cache_unregister
depmod: add_hex
depmod: cache_check
depmod: svcauth_unix_purge
depmod: get_word
depmod: cache_clean
depmod: cache_register
depmod: auth_unix_lookup
depmod: auth_unix_add_addr
depmod: cache_init
depmod: auth_unix_forget_old
depmod: add_word
Hope this helps,
Ed Tomlinson
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 2.5.42-mm2
2002-10-12 6:39 2.5.42-mm2 Andrew Morton
2002-10-12 13:19 ` 2.5.42-mm2 Ed Tomlinson
@ 2002-10-12 16:22 ` Ingo Oeser
2002-10-12 17:26 ` 2.5.42-mm2 Andrew Morton
2002-10-13 10:19 ` 2.5.42-mm2 William Lee Irwin III
2002-10-13 21:22 ` 2.5.42-mm2 William Lee Irwin III
3 siblings, 1 reply; 13+ messages in thread
From: Ingo Oeser @ 2002-10-12 16:22 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-mm
Hi Andrew,
On Fri, Oct 11, 2002 at 11:39:33PM -0700, Andrew Morton wrote:
> +remove-kiobufs.patch
>
> Remove the kiobuf infrastructure.
Stupid question: Would you accept a patch that extends
get_user_pages() to accept an additional "struct scatterlist vector[]"?
Because otherwise we have a senseless pages[] array in memory,
which we copy then into a scatterlist.
A different function using most of get_user_pages() is also
possible.
And last but not least: EXPORT_SYMBOL_GPL() of both, to make it
usable in modules.
Rationale: Most users of get_user_pages() and kiobufs really want
a struct scatterlist sooner or later to transmit it via DMA.
PIO-Users would need a copy_from_user_to_io() and the
counterpart. ALSA implements it somewhere.
So while we are at it... ;-)
Regards
Ingo Oeser
--
Science is what we can tell a computer. Art is everything else. --- D.E.Knuth
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 2.5.42-mm2
2002-10-12 16:22 ` 2.5.42-mm2 Ingo Oeser
@ 2002-10-12 17:26 ` Andrew Morton
2002-10-13 10:56 ` 2.5.42-mm2 Ingo Oeser
0 siblings, 1 reply; 13+ messages in thread
From: Andrew Morton @ 2002-10-12 17:26 UTC (permalink / raw)
To: Ingo Oeser; +Cc: linux-mm
Ingo Oeser wrote:
>
> Hi Andrew,
>
> On Fri, Oct 11, 2002 at 11:39:33PM -0700, Andrew Morton wrote:
> > +remove-kiobufs.patch
> >
> > Remove the kiobuf infrastructure.
>
> Stupid question: Would you accept a patch that extends
> get_user_pages() to accept an additional "struct scatterlist vector[]"?
It's not really my area Ingo. But I can wave such a patch about
on the mailing lists, generally get it some review and attention
I guess.
Such nfrastructure would need something which used it, as a proof-of-concept,
testbed, etc...
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 2.5.42-mm2
2002-10-12 6:39 2.5.42-mm2 Andrew Morton
2002-10-12 13:19 ` 2.5.42-mm2 Ed Tomlinson
2002-10-12 16:22 ` 2.5.42-mm2 Ingo Oeser
@ 2002-10-13 10:19 ` William Lee Irwin III
2002-10-13 17:47 ` 2.5.42-mm2 Andrew Morton
2002-10-27 7:32 ` 2.5.42-mm2 Andrew Morton
2002-10-13 21:22 ` 2.5.42-mm2 William Lee Irwin III
3 siblings, 2 replies; 13+ messages in thread
From: William Lee Irwin III @ 2002-10-13 10:19 UTC (permalink / raw)
To: Andrew Morton; +Cc: lkml, linux-mm
On Fri, Oct 11, 2002 at 11:39:33PM -0700, Andrew Morton wrote:
> url: http://www.zip.com.au/~akpm/linux/patches/2.5/2.5.42/2.5.42-mm2/
This patch does 5 things:
(1) when the OOM killer fails and the system panics, calls
show_free_areas()
(2) reorganizes show_free_areas() to use for_each_zone()
(3) adds per-cpu stats to show_free_areas()
(4) tags output from show_free_areas() with node and zone information
(5) initializes zone->per_cpu_pageset[cpu].pcp[temperature].reserved
in free_area_init_core()
The net effect is better reporting of where memory went, which was
essential to determining the cause of this failure, and that the
reserved page stuff can actually boot. Prior to this it was getting
total garbage in ->reserved after free_area_init_core():
Node 0, Zone DMA: per-cpu:
cpu 0 hot: low 32, high 96, batch 16, reserved 1683971840
cpu 0 cold: low 0, high 32, batch 16, reserved 1953719651
cpu 1 hot: low 32, high 96, batch 16, reserved 1702256479
cpu 1 cold: low 0, high 32, batch 16, reserved 825241951
And this caused a false bootmem OOM. It would have been impossible to
determine the cause of failure without show_free_areas() modifications,
and this is a box-killing bug that wipes out a significant fraction of
the high-end developer base from 2.5.x contributions as well as
preventing all i386 NUMA boxen, which the highest volume high-end
configurations, from booting. Furthermore, it also cleans up
show_free_areas() in a very straightforward fashion.
Against 2.5.42-mm2.
diff -urpN mm-2.5.42/mm/oom_kill.c virgin-2.5.42/mm/oom_kill.c
--- mm-2.5.42/mm/oom_kill.c 2002-10-11 21:22:08.000000000 -0700
+++ virgin-2.5.42/mm/oom_kill.c 2002-10-13 01:35:51.000000000 -0700
@@ -172,8 +172,10 @@ static void oom_kill(void)
p = select_bad_process();
/* Found nothing?!?! Either we hang forever, or we panic. */
- if (p == NULL)
+ if (!p) {
+ show_free_areas();
panic("Out of memory and no killable processes...\n");
+ }
/* kill all processes that share the ->mm (i.e. all threads) */
do_each_thread(g, q)
diff -urpN mm-2.5.42/mm/page_alloc.c virgin-2.5.42/mm/page_alloc.c
--- mm-2.5.42/mm/page_alloc.c 2002-10-13 02:37:25.000000000 -0700
+++ virgin-2.5.42/mm/page_alloc.c 2002-10-13 02:05:12.000000000 -0700
@@ -830,11 +830,11 @@ void si_meminfo(struct sysinfo *val)
*/
void show_free_areas(void)
{
- pg_data_t *pgdat;
struct page_state ps;
- int type;
+ int cpu, temperature;
unsigned long active;
unsigned long inactive;
+ struct zone *zone;
get_page_state(&ps);
get_zone_counts(&active, &inactive);
@@ -843,26 +843,24 @@ void show_free_areas(void)
K(nr_free_pages()),
K(nr_free_highpages()));
- for (pgdat = pgdat_list; pgdat; pgdat = pgdat->pgdat_next)
- for (type = 0; type < MAX_NR_ZONES; ++type) {
- struct zone *zone = &pgdat->node_zones[type];
- printk("Zone:%s"
- " freepages:%6lukB"
- " min:%6lukB"
- " low:%6lukB"
- " high:%6lukB"
- " active:%6lukB"
- " inactive:%6lukB"
- "\n",
- zone->name,
- K(zone->free_pages),
- K(zone->pages_min),
- K(zone->pages_low),
- K(zone->pages_high),
- K(zone->nr_active),
- K(zone->nr_inactive)
- );
- }
+ for_each_zone(zone)
+ printk("Node %d, Zone:%s"
+ " freepages:%6lukB"
+ " min:%6lukB"
+ " low:%6lukB"
+ " high:%6lukB"
+ " active:%6lukB"
+ " inactive:%6lukB"
+ "\n",
+ zone->zone_pgdat->node_id,
+ zone->name,
+ K(zone->free_pages),
+ K(zone->pages_min),
+ K(zone->pages_low),
+ K(zone->pages_high),
+ K(zone->nr_active),
+ K(zone->nr_inactive)
+ );
printk("( Active:%lu inactive:%lu dirty:%lu writeback:%lu free:%u )\n",
active,
@@ -871,26 +869,49 @@ void show_free_areas(void)
ps.nr_writeback,
nr_free_pages());
- for (pgdat = pgdat_list; pgdat; pgdat = pgdat->pgdat_next)
- for (type = 0; type < MAX_NR_ZONES; type++) {
- struct list_head *elem;
- struct zone *zone = &pgdat->node_zones[type];
- unsigned long nr, flags, order, total = 0;
+ for_each_zone(zone) {
+ struct list_head *elem;
+ unsigned long nr, flags, order, total = 0;
+
+ printk("Node %d, Zone %s: ", zone->zone_pgdat->node_id, zone->name);
+ if (!zone->present_pages) {
+ printk("empty\n");
+ continue;
+ }
- if (!zone->present_pages)
- continue;
+ spin_lock_irqsave(&zone->lock, flags);
+ for (order = 0; order < MAX_ORDER; order++) {
+ nr = 0;
+ list_for_each(elem, &zone->free_area[order].free_list)
+ ++nr;
+ total += nr << order;
+ printk("%lu*%lukB ", nr, K(1UL) << order);
+ }
+ spin_unlock_irqrestore(&zone->lock, flags);
+ printk("= %lukB)\n", K(total));
+ }
- spin_lock_irqsave(&zone->lock, flags);
- for (order = 0; order < MAX_ORDER; order++) {
- nr = 0;
- list_for_each(elem, &zone->free_area[order].free_list)
- ++nr;
- total += nr << order;
- printk("%lu*%lukB ", nr, K(1UL) << order);
- }
- spin_unlock_irqrestore(&zone->lock, flags);
- printk("= %lukB)\n", K(total));
+ for_each_zone(zone) {
+ printk("Node %d, Zone %s: per-cpu:", zone->zone_pgdat->node_id, zone->name);
+
+ if (!zone->present_pages) {
+ printk(" empty\n");
+ continue;
+ } else
+ printk("\n");
+
+ for (cpu = 0; cpu < NR_CPUS; ++cpu) {
+ struct per_cpu_pageset *pageset = zone->pageset + cpu;
+ for (temperature = 0; temperature < 2; temperature++)
+ printk("cpu %d %s: low %d, high %d, batch %d, reserved %d\n",
+ cpu,
+ temperature ? "cold" : "hot",
+ pageset->pcp[temperature].low,
+ pageset->pcp[temperature].high,
+ pageset->pcp[temperature].batch,
+ pageset->pcp[temperature].reserved);
}
+ }
show_swap_cache_info();
}
@@ -1097,6 +1118,7 @@ static void __init free_area_init_core(s
pcp->low = 32;
pcp->high = 96;
pcp->batch = 16;
+ pcp->reserved = 0;
INIT_LIST_HEAD(&pcp->list);
pcp = &zone->pageset[cpu].pcp[1]; /* cold */
@@ -1104,6 +1126,7 @@ static void __init free_area_init_core(s
pcp->low = 0;
pcp->high = 32;
pcp->batch = 16;
+ pcp->reserved = 0;
INIT_LIST_HEAD(&pcp->list);
}
INIT_LIST_HEAD(&zone->active_list);
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 2.5.42-mm2
2002-10-12 17:26 ` 2.5.42-mm2 Andrew Morton
@ 2002-10-13 10:56 ` Ingo Oeser
2002-10-13 16:43 ` 2.5.42-mm2 Kai Makisara
0 siblings, 1 reply; 13+ messages in thread
From: Ingo Oeser @ 2002-10-13 10:56 UTC (permalink / raw)
To: Andrew Morton; +Cc: Kai Makisara, Douglas Gilbert, linux-scsi, linux-mm
[-- Attachment #1: Type: text/plain, Size: 1478 bytes --]
Hi Andrew,
[I cc'ed the people relevant to this issue]
On Sat, Oct 12, 2002 at 10:26:44AM -0700, Andrew Morton wrote:
> Ingo Oeser wrote:
> > Stupid question: Would you accept a patch that extends
> > get_user_pages() to accept an additional "struct scatterlist vector[]"?
>
> It's not really my area Ingo. But I can wave such a patch about
> on the mailing lists, generally get it some review and attention
> I guess.
I had waved an example on what is really needed instead of kiobuf
crap some time ago[1]. This raised a discussion on linux-scsi[2]
(but I'm not subscribed there) and someone[2] actually successfully
tested this.
> Such nfrastructure would need something which used it, as a proof-of-concept,
> testbed, etc...
I would love to test my ideas out, but the special purpose device
where I need it for has bit-errors on its big SDRAM chips and I can
only use a small 32K area of storage for testing, which is not
expected to reveal any noticable performance from that method,
due to the high setup overhead. I think you know the numbers from
direct-io.
The video hardware, where you (or Geert?) basically implemented
the things, we proposed[3] would be a perfect testbed for this.
Thanks & Regards
Ingo Oeser
[1] <20020720003918.G758@nightmaster.csn.tu-chemnitz.de> on lkml
[2] <Pine.LNX.4.44.0207292045040.770-100000@kai.makisara.local> on linux-scsi
[3] Attached here.
--
Science is what we can tell a computer. Art is everything else. --- D.E.Knuth
[-- Attachment #2: sgmap.c --]
[-- Type: text/plain, Size: 2302 bytes --]
/* Proposal for User space <-> scatterlist mapping
* by Ingo Oeser <ioe@informatik.tu-chemnitz.de>
* and Kai Makisara <Kai.Makisara@kolumbus.fi> */
#define SGMAP_MAX_UDMA_PAGES (1 << (19 - PAGE_SHIFT))
#define SGMAP_MAX_UDMA_PAGES_INLINE 16
/* An experiment ... */
/* Pin down user pages and put them into a scatter gather list */
int sg_map_user_pages(struct scatterlist *sgl, const unsigned int max_pages,
unsigned long uaddr, size_t count, int rw)
{
int res, i;
unsigned int nr_pages = ((uaddr & ~PAGE_MASK) + count - 1 + ~PAGE_MASK) >> PAGE_SHIFT;
struct page *inline_pages[SGMAP_MAX_UDMA_PAGES_INLINE];
struct page **pages = inline_pages;
/* User attempted Overflow!
* NOTE: This kind of request must be split by the caller.
*/
if ((uaddr + count) < uaddr)
return -EINVAL;
/* To big for provided scatterlist array */
if (nr_pages > max_pages)
return -ENOMEM;
/* Hmm? */
if (count == 0)
return 0;
if (unlikely(nr_pages > SGMAP_MAX_UDMA_PAGES_INLINE)) {
pages = kmalloc(nr_pages * sizeof(pages[0]), GFP_USER);
if (!pages)
return -ENOMEM;
}
down_read(¤t->mm->mmap_sem);
res = get_user_pages(
current,
current->mm,
uaddr,
nr_pages,
rw == READ, /* logic is perversed^Wreversed here :-( */
0, /* don't force */
&pages[0],
NULL);
up_read(¤t->mm->mmap_sem);
/* Errors and no page mapped should return here */
if (res <= 0)
goto out_free;
memset(sgl, 0, sizeof(*sgl) * nr_pages);
sgl[0].page = pages[0];
sgl[0].offset = uaddr & ~PAGE_MASK;
/* FIXME: flush superflous for rw==READ,
* probably wrong function for rw==WRITE
*/
flush_dcache_page(pages[0]);
/* Page crossing transfers need these adjustments */
if (res > 1) {
for (i = 1; i < res; i++) {
sgl[i].offset = 0;
sgl[i].page = pages[i];
sgl[i].length = PAGE_SIZE;
flush_dcache_page(pages[i]);
}
sgl[0].length = PAGE_SIZE - sgl[0].offset;
count -= sgl[0].length;
count -= (res - 2) * PAGE_SIZE;
}
sgl[res - 1].length = count;
out_free:
if (pages != inline_pages)
kfree(pages);
return res;
}
/* And unmap them... */
int sg_unmap_user_pages(struct scatterlist *sgl, const unsigned int nr_pages)
{
int i;
for (i = 0; i < nr_pages; i++)
page_cache_release(sgl[i].page);
return 0;
}
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 2.5.42-mm2
2002-10-13 10:56 ` 2.5.42-mm2 Ingo Oeser
@ 2002-10-13 16:43 ` Kai Makisara
0 siblings, 0 replies; 13+ messages in thread
From: Kai Makisara @ 2002-10-13 16:43 UTC (permalink / raw)
To: Ingo Oeser, Andrew Morton; +Cc: Douglas Gilbert, linux-scsi, linux-mm
On Sun, 13 Oct 2002, Ingo Oeser wrote:
> Hi Andrew,
>
> [I cc'ed the people relevant to this issue]
>
> On Sat, Oct 12, 2002 at 10:26:44AM -0700, Andrew Morton wrote:
> > Ingo Oeser wrote:
> > > Stupid question: Would you accept a patch that extends
> > > get_user_pages() to accept an additional "struct scatterlist vector[]"?
> >
> > It's not really my area Ingo. But I can wave such a patch about
> > on the mailing lists, generally get it some review and attention
> > I guess.
>
> I had waved an example on what is really needed instead of kiobuf
> crap some time ago[1]. This raised a discussion on linux-scsi[2]
> (but I'm not subscribed there) and someone[2] actually successfully
> tested this.
>
> > Such nfrastructure would need something which used it, as a proof-of-concept,
> > testbed, etc...
>
> I would love to test my ideas out, but the special purpose device
> where I need it for has bit-errors on its big SDRAM chips and I can
> only use a small 32K area of storage for testing, which is not
> expected to reveal any noticable performance from that method,
> due to the high setup overhead. I think you know the numbers from
> direct-io.
>
> The video hardware, where you (or Geert?) basically implemented
> the things, we proposed[3] would be a perfect testbed for this.
>
The SCSI tape driver has used an approach nearly similar to [3] from
2.5.32. The same applies to Doug Gilbert's the generic SCSI driver. The
mapping and unmapping functions are duplicated in st.c and sg.c. This is
meant to be a temporary solution until something useful appears elsewhere
in the kernel.
The st.c versions of the mapping and unmapping functions are almost same
as [3]:
- GFP_KERNEL is used instead of GFP_USER when allocating the page pointer
buffer (is GFP_USER really correct in this case?)
- partial mappings are not accepted
- the unmapping functions marks pages dirty if told to do that
[3] is OK for st.c if it is the most versatile interface for other users.
The only problem so far has been with the sg driver in Doug's sgm_dd that
does direct write from a driver buffer mmapped to the user program (i.e.,
copies data using a buffer within the driver). Doug asked me to look at
the problem and try to find out if there is something wrong with an
approach like [3]. I inserted some printks into sg and found out that
get_user_pages() returned bogus page pointers in this case. I do not
understand vm enough to say where the problem is in this special case.
> Thanks & Regards
>
> Ingo Oeser
>
> [1] <20020720003918.G758@nightmaster.csn.tu-chemnitz.de> on lkml
> [2] <Pine.LNX.4.44.0207292045040.770-100000@kai.makisara.local> on linux-scsi
> [3] Attached here.
>
--
Kai
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 2.5.42-mm2
2002-10-13 10:19 ` 2.5.42-mm2 William Lee Irwin III
@ 2002-10-13 17:47 ` Andrew Morton
2002-10-13 19:52 ` 2.5.42-mm2 William Lee Irwin III
2002-10-27 7:32 ` 2.5.42-mm2 Andrew Morton
1 sibling, 1 reply; 13+ messages in thread
From: Andrew Morton @ 2002-10-13 17:47 UTC (permalink / raw)
To: William Lee Irwin III; +Cc: lkml, linux-mm
William Lee Irwin III wrote:
>
> @@ -1104,6 +1126,7 @@ static void __init free_area_init_core(s
> pcp->low = 0;
> pcp->high = 32;
> pcp->batch = 16;
> + pcp->reserved = 0;
> INIT_LIST_HEAD(&pcp->list);
> }
> INIT_LIST_HEAD(&zone->active_list);
OK. But that's been there since 2.5.40-mm2. Why did it suddenly
bite?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 2.5.42-mm2
2002-10-13 17:47 ` 2.5.42-mm2 Andrew Morton
@ 2002-10-13 19:52 ` William Lee Irwin III
2002-10-13 20:04 ` 2.5.42-mm2 Rik van Riel
0 siblings, 1 reply; 13+ messages in thread
From: William Lee Irwin III @ 2002-10-13 19:52 UTC (permalink / raw)
To: Andrew Morton; +Cc: lkml, linux-mm
William Lee Irwin III wrote:
>> @@ -1104,6 +1126,7 @@ static void __init free_area_init_core(s
>> pcp->low = 0;
>> pcp->high = 32;
>> pcp->batch = 16;
>> + pcp->reserved = 0;
>> INIT_LIST_HEAD(&pcp->list);
>> }
>> INIT_LIST_HEAD(&zone->active_list);
On Sun, Oct 13, 2002 at 10:47:19AM -0700, Andrew Morton wrote:
> OK. But that's been there since 2.5.40-mm2. Why did it suddenly
> bite?
I must have been way too tired or something:
(1) It's embedded in struct zone, hence bootmem allocated, hence
already zeroed.
(2) The logs still show the show_free_areas() call immediately after
free_all_bootmem_core() seeing the garbage ->reserved values.
Bill
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 2.5.42-mm2
2002-10-13 19:52 ` 2.5.42-mm2 William Lee Irwin III
@ 2002-10-13 20:04 ` Rik van Riel
2002-10-13 20:42 ` 2.5.42-mm2 William Lee Irwin III
0 siblings, 1 reply; 13+ messages in thread
From: Rik van Riel @ 2002-10-13 20:04 UTC (permalink / raw)
To: William Lee Irwin III; +Cc: Andrew Morton, lkml, linux-mm
On Sun, 13 Oct 2002, William Lee Irwin III wrote:
> (1) It's embedded in struct zone, hence bootmem allocated, hence
> already zeroed.
The struct zone doesn't get automatically zeroed on all architectures.
Rik
--
Bravely reimplemented by the knights who say "NIH".
http://www.surriel.com/ http://distro.conectiva.com/
Current spamtrap: <a href=mailto:"october@surriel.com">october@surriel.com</a>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 2.5.42-mm2
2002-10-13 20:04 ` 2.5.42-mm2 Rik van Riel
@ 2002-10-13 20:42 ` William Lee Irwin III
0 siblings, 0 replies; 13+ messages in thread
From: William Lee Irwin III @ 2002-10-13 20:42 UTC (permalink / raw)
To: Rik van Riel; +Cc: Andrew Morton, lkml, linux-mm
On Sun, 13 Oct 2002, William Lee Irwin III wrote:
>> (1) It's embedded in struct zone, hence bootmem allocated, hence
>> already zeroed.
On Sun, Oct 13, 2002 at 06:04:02PM -0200, Rik van Riel wrote:
> The struct zone doesn't get automatically zeroed on all architectures.
It actually doesn't come out of bootmem. It's tacked onto min_low_pfn
because it's being dynamically allocated prior to init_bootmem().
Bill
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 2.5.42-mm2
2002-10-12 6:39 2.5.42-mm2 Andrew Morton
` (2 preceding siblings ...)
2002-10-13 10:19 ` 2.5.42-mm2 William Lee Irwin III
@ 2002-10-13 21:22 ` William Lee Irwin III
3 siblings, 0 replies; 13+ messages in thread
From: William Lee Irwin III @ 2002-10-13 21:22 UTC (permalink / raw)
To: Andrew Morton; +Cc: lkml, linux-mm
On Fri, Oct 11, 2002 at 11:39:33PM -0700, Andrew Morton wrote:
> url: http://www.zip.com.au/~akpm/linux/patches/2.5/2.5.42/2.5.42-mm2/
To future-proof NUMA-Q vs. similar issues to pcp->reserved:
--- linux-2.5.42/arch/i386/mm/discontig.c 2002-10-11 21:22:09.000000000 -0700
+++ virgin-2.5.42/arch/i386/mm/discontig.c 2002-10-13 14:18:19.000000000 -0700
@@ -70,6 +70,7 @@ static void __init allocate_pgdat(int ni
node_datasz = PFN_UP(sizeof(struct pglist_data));
NODE_DATA(nid) = (pg_data_t *)(__va(min_low_pfn << PAGE_SHIFT));
min_low_pfn += node_datasz;
+ memset(NODE_DATA(nid), 0, sizeof(struct pglist_data));
}
/*
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 2.5.42-mm2
2002-10-13 10:19 ` 2.5.42-mm2 William Lee Irwin III
2002-10-13 17:47 ` 2.5.42-mm2 Andrew Morton
@ 2002-10-27 7:32 ` Andrew Morton
1 sibling, 0 replies; 13+ messages in thread
From: Andrew Morton @ 2002-10-27 7:32 UTC (permalink / raw)
To: William Lee Irwin III; +Cc: linux-mm
William Lee Irwin III wrote:
>
> This patch does 5 things:
>
> (1) when the OOM killer fails and the system panics, calls
> show_free_areas()
> (2) reorganizes show_free_areas() to use for_each_zone()
> (3) adds per-cpu stats to show_free_areas()
> (4) tags output from show_free_areas() with node and zone information
> (5) initializes zone->per_cpu_pageset[cpu].pcp[temperature].reserved
> in free_area_init_core()
hm. I just ran out of swap and got oom-killed.
Would it make sense to call show_free_areas() for _all_ oom-killings?
I think so. At least during the development cycle.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2002-10-27 7:32 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-12 6:39 2.5.42-mm2 Andrew Morton
2002-10-12 13:19 ` 2.5.42-mm2 Ed Tomlinson
2002-10-12 16:22 ` 2.5.42-mm2 Ingo Oeser
2002-10-12 17:26 ` 2.5.42-mm2 Andrew Morton
2002-10-13 10:56 ` 2.5.42-mm2 Ingo Oeser
2002-10-13 16:43 ` 2.5.42-mm2 Kai Makisara
2002-10-13 10:19 ` 2.5.42-mm2 William Lee Irwin III
2002-10-13 17:47 ` 2.5.42-mm2 Andrew Morton
2002-10-13 19:52 ` 2.5.42-mm2 William Lee Irwin III
2002-10-13 20:04 ` 2.5.42-mm2 Rik van Riel
2002-10-13 20:42 ` 2.5.42-mm2 William Lee Irwin III
2002-10-27 7:32 ` 2.5.42-mm2 Andrew Morton
2002-10-13 21:22 ` 2.5.42-mm2 William Lee Irwin III
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox