All of lore.kernel.org
 help / color / mirror / Atom feed
* mm question
@ 2001-12-10 13:25 volodya
  2001-12-10 13:46 ` Alan Cox
  0 siblings, 1 reply; 40+ messages in thread
From: volodya @ 2001-12-10 13:25 UTC (permalink / raw)
  To: linux-kernel


 Things change. In particular Linux since 2.x.x. After spending several
hours peering at prolifiration of functions and constants in mm.h I
decided to take an easy way out and ask people responsible for this
sophistication:

 How does one do the following task: obtain a bunch of free pages (around
300K) with physical addresses between certain bounds (more then
0x4000000, but it is likely this is not constant) reserver them and map to
kernel space so that the driver can access them directly ?

                        thanks !

                               Vladimir Dergachev


^ permalink raw reply	[flat|nested] 40+ messages in thread
* MM question
@ 1999-02-21 19:53 Magnus Ahltorp
  1999-02-21 21:34 ` Benjamin C.R. LaHaise
  0 siblings, 1 reply; 40+ messages in thread
From: Magnus Ahltorp @ 1999-02-21 19:53 UTC (permalink / raw)
  To: linux-mm

I'm working on a Linux port of Arla, a free AFS (a distributed file
system) client. Arla caches whole files, which means that the read and
write file system calls are tunneled through to the cache file system
(usually ext2).

I implement the inode operation readpage for reads and the file
operation write for writes. readpage gets tunneled by creating a new
struct file and filling in the cache inode. write gets tunneled in
much the same way. Though, I have been seeing problems when a file
gets written to. The written data weren't always seen when doing
reads. Someone then suggested that the folloing code be added to
write:

	page = get_free_page(GFP_KERNEL);
	if (!page)
	    invalidate_inode_pages(inode);
	else {
	    int pos = file->f_pos;
	    int cnt = count;
	    int blk;
	    char *data=(char *)page;

	    while (cnt > 0) {
		blk = cnt;
		if (blk > PAGE_SIZE)
		    blk = PAGE_SIZE;
		copy_from_user(data, buf, blk);
		update_vm_cache(inode, pos, data, blk);
		pos += blk;
		cnt -= blk;
	    }
	    free_page(page);
	}

I inserted this piece of code, and things worked quite well. After a
while, I was seeing new problems. Writes were not propagating properly
to the cache file.

Does anyone have any suggestions on how this really should be done?

/Magnus
map@stacken.kth.se
--
To unsubscribe, send a message with 'unsubscribe linux-mm my@address'
in the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/

^ permalink raw reply	[flat|nested] 40+ messages in thread
* MM question
@ 1999-02-16  2:30 Jason Titus
  1999-02-18 15:06 ` Stephen C. Tweedie
  0 siblings, 1 reply; 40+ messages in thread
From: Jason Titus @ 1999-02-16  2:30 UTC (permalink / raw)
  To: linux-mm

I know this must be on a FAQ or some such, but after many hours of 
newsgroup/web searching - nothing.

Is there a way to turn off/down the page caching and buffering?  I'm doing
database work and am having a really time benchmarking other elements of the
system due to Linux's friendly caching....

I have tried editing /proc/sys/vm/pagecache and buffermem, but the changes
don't seem to do anything (2.2.0-pre5 - x86).  Is there something you have
to do to activate the changes?  Is there some other file to edit to set the
variables at boot time?

It sure would be nice to have more control over the caching, like being able
to have a /etc/cache.conf file where you could set parameters and mark
certain files/filetypes as priority cache items...

Anyway, any help would be much appreciated, and sorry for the ignorant
question,

Jason Titus
jason@iatlas.com
--
To unsubscribe, send a message with 'unsubscribe linux-mm my@address'
in the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/

^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2001-12-11 18:38 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-12-10 13:25 mm question volodya
2001-12-10 13:46 ` Alan Cox
2001-12-10 13:47   ` volodya
2001-12-10 14:07     ` Alan Cox
2001-12-10 15:03       ` volodya
2001-12-10 15:21         ` Alan Cox
2001-12-10 15:40           ` Rik van Riel
2001-12-10 16:14             ` volodya
2001-12-10 16:48               ` Rik van Riel
2001-12-10 17:02                 ` volodya
2001-12-10 17:16               ` Alan Cox
2001-12-10 17:29                 ` volodya
2001-12-10 18:05                   ` Rik van Riel
2001-12-10 18:08                     ` volodya
2001-12-10 18:17                       ` Rik van Riel
2001-12-10 21:30                         ` volodya
2001-12-10 18:26                       ` Alan Cox
2001-12-10 21:27                         ` volodya
2001-12-10 21:42                           ` Alan Cox
2001-12-11  1:52                             ` volodya
2001-12-11  8:47                               ` Eric W. Biederman
2001-12-11 11:07                                 ` volodya
2001-12-11 18:39                                   ` Daniel Phillips
2001-12-10 16:05           ` volodya
2001-12-10 17:09             ` Martin J. Bligh
2001-12-10 17:16               ` Martin J. Bligh
2001-12-10 17:26               ` volodya
2001-12-10 17:25             ` Alan Cox
2001-12-10 17:38               ` volodya
2001-12-10 17:51                 ` Alan Cox
2001-12-10 17:43                   ` volodya
2001-12-10 18:12                     ` Alan Cox
  -- strict thread matches above, loose matches on Subject: below --
1999-02-21 19:53 MM question Magnus Ahltorp
1999-02-21 21:34 ` Benjamin C.R. LaHaise
1999-02-22 21:13   ` Magnus Ahltorp
1999-02-24 17:36     ` Benjamin C.R. LaHaise
1999-02-24 17:55       ` Magnus Ahltorp
1999-03-15 18:05     ` Stephen C. Tweedie
1999-02-16  2:30 Jason Titus
1999-02-18 15:06 ` Stephen C. Tweedie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.