From: Andrea Arcangeli <andrea@suse.de>
To: Kanoj Sarcar <kanoj@google.engr.sgi.com>
Cc: alan@lxorguk.ukuu.org.uk, torvalds@transmeta.com, sct@redhat.com,
Gerhard.Wichert@pdb.siemens.de, Winfried.Gerhard@pdb.siemens.de,
linux-kernel@vger.rutgers.edu, linux-mm@kvack.org
Subject: Re: [bigmem-patch] 4GB with Linux on IA32
Date: Tue, 17 Aug 1999 02:10:43 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.10.9908170151190.14379-100000@laser.random> (raw)
In-Reply-To: <199908162339.QAA67278@google.engr.sgi.com>
On Mon, 16 Aug 1999, Kanoj Sarcar wrote:
>a page to remap to). Remapping in just the swap code is acceptable, but
>probably not for other cases (like rawio).
Agreed completly.
>way it is, is so that drivers don't break. I think 2.3 is the place to
>teach the kernel and drivers that all of memory is not directly mappable.
I tried to avoid this (and I am been successfully until I noticed raw-io
in 2.3.13... sigh).
In the meantime I'll take raw-io disabled if CONFIG_BIGMEM is set .
> [..] And kmalloc could also use
>bigmem pages for holding kernel data structures ...
I really don't think this will ever happen.
BTW, the previous patch I posted for disable raw-io on bigmem pages seems
that won't work correctly but it seems a bug in map_user_kiobuf:
[..]
static struct page * get_page_map(unsigned long page)
{
struct page *map;
if (MAP_NR(page) >= max_mapnr)
return 0;
if (page == ZERO_PAGE(page))
return 0;
map = mem_map + MAP_NR(page);
if (PageReserved(map))
return 0;
#ifdef CONFIG_BIGMEM
if (PageBIGMEM(map))
return 0;
#endif
return map;
}
[..]
map = get_page_map(page);
if (map) {
if (TryLockPage(map)) {
goto retry;
}
atomic_inc(&map->count);
}
spin_unlock(&mm->page_table_lock);
dprintk ("Installing page %p %p: %d\n", (void *)page, map, i);
iobuf->pagelist[i] = page;
iobuf->maplist[i] = map;
iobuf->nr_pages = ++i;
ptr += PAGE_SIZE;
[..]
If get_page_map() will return zero, then the page will be queued anyway in
the iobuf. The fact that the map is null won't be checked in brw_kiovec().
So it seems you could write to the ZERO_PAGE if you first mmap() the zero
page and then you give as buffer the userspace area where you have mapped
the zero-page... What am I missing?
Andrea
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/
next prev parent reply other threads:[~1999-08-17 0:10 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-08-16 16:29 Andrea Arcangeli
1999-08-16 16:48 ` Matthew Wilcox
1999-08-16 17:19 ` Andrea Arcangeli
1999-08-16 18:43 ` Kanoj Sarcar
1999-08-16 19:43 ` Alan Cox
1999-08-16 20:54 ` Andrea Arcangeli
1999-08-16 22:47 ` Andrea Arcangeli
1999-08-16 23:26 ` Andrea Arcangeli
1999-08-16 23:39 ` Kanoj Sarcar
1999-08-17 0:10 ` Andrea Arcangeli [this message]
1999-08-17 6:37 ` Kanoj Sarcar
1999-08-17 6:41 ` Linus Torvalds
1999-08-17 6:50 ` Kanoj Sarcar
1999-08-17 7:03 ` Linus Torvalds
1999-08-17 7:23 ` Linus Torvalds
1999-08-17 11:39 ` Alan Cox
1999-08-26 16:27 ` Andrea Arcangeli
1999-08-17 11:46 ` Alan Cox
1999-08-17 14:26 ` Andrea Arcangeli
1999-08-17 6:39 ` Linus Torvalds
1999-08-17 12:40 ` Andrea Arcangeli
1999-08-17 6:29 ` Linus Torvalds
1999-08-17 12:37 ` Andrea Arcangeli
1999-08-17 14:04 ` Andrea Arcangeli
1999-08-17 8:52 ` Jakub Jelinek
1999-08-17 9:13 ` Pavel Machek
1999-08-18 14:08 ` Andrea Arcangeli
1999-08-19 12:20 ` Andrea Arcangeli
1999-08-16 23:28 ` Kanoj Sarcar
1999-08-16 23:49 ` Andrea Arcangeli
1999-08-17 6:29 ` David S. Miller
1999-08-17 12:38 ` Andrea Arcangeli
1999-08-17 0:17 ` Andrea Arcangeli
1999-08-19 13:33 ` Thierry Vignaud
1999-08-19 16:49 ` Stephen C. Tweedie
1999-08-20 7:35 ` Thierry Vignaud
1999-08-20 9:55 ` Alan Cox
1999-08-20 18:25 ` Linus Torvalds
1999-08-16 20:34 ` Andrea Arcangeli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.10.9908170151190.14379-100000@laser.random \
--to=andrea@suse.de \
--cc=Gerhard.Wichert@pdb.siemens.de \
--cc=Winfried.Gerhard@pdb.siemens.de \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=kanoj@google.engr.sgi.com \
--cc=linux-kernel@vger.rutgers.edu \
--cc=linux-mm@kvack.org \
--cc=sct@redhat.com \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox