linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Implications of PG_locked and reference count in page structures....
@ 2001-08-15 15:39 Michael Heinz
  2001-08-15 16:04 ` Ignacio Vazquez-Abrams
  2001-08-15 17:04 ` Daniel Phillips
  0 siblings, 2 replies; 5+ messages in thread
From: Michael Heinz @ 2001-08-15 15:39 UTC (permalink / raw)
  To: linux-kernel

I'm in the process of porting a driver to Linux. The author of the 
driver conveniently broke it into os-dependent and independent sections.

One of the things in the "OS" dependent section is a routine to lock a 
section of memory presumably to be used for DMA.

So, what I want to do is this: given a pointer to a previously 
kmalloc'ed block, and the length of that block, I want to (a) identify 
each page associated with the block and (b) lock each page. It appears 
that I can lock the page either by incrementing it's reference count, or 
by setting the PG_locked flag for the page.

Which method is preferred? Is there another method I should be using 
instead?



^ permalink raw reply	[flat|nested] 5+ messages in thread
[parent not found: <no.id>]
* RE: Implications of PG_locked and reference count in page structures....
@ 2001-08-15 17:10 Heinz, Michael
  0 siblings, 0 replies; 5+ messages in thread
From: Heinz, Michael @ 2001-08-15 17:10 UTC (permalink / raw)
  To: Alan Cox, ignacio; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 545 bytes --]

Thanks for all the replies; 

I am using the O'Reilly book - but I'm kind of stuck using the semantics
that the driver's original author used. The whole effort is so we can
experiment with some hardware rather than for final release, so we don't
want to spend too much effort reengineering anything we don't have to.

Heh. I missed the part in LDD that mentions kmalloc regions being
unpageable. 

;->

--
"Oh, bother!" said the Borg. "We've assimilated Pooh!"
"Thanks for noticing." replied Eeyore.

mheinz@infiniconsys.com
 

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Heinz, Michael.vcf --]
[-- Type: text/x-vcard; name="Heinz, Michael.vcf", Size: 140 bytes --]

BEGIN:VCARD
VERSION:2.1
N:Heinz;Michael
FN:Heinz, Michael
EMAIL;PREF;INTERNET:mheinz@infiniconsys.com
REV:20010711T191535Z
END:VCARD

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

end of thread, other threads:[~2001-08-15 17:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-15 15:39 Implications of PG_locked and reference count in page structures Michael Heinz
2001-08-15 16:04 ` Ignacio Vazquez-Abrams
2001-08-15 17:04 ` Daniel Phillips
     [not found] <no.id>
2001-08-15 15:55 ` Alan Cox
2001-08-15 17:10 Heinz, Michael

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).