public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: linux-ia64@vger.kernel.org
Subject: Re: pages already locked on ia64
Date: Mon, 24 Nov 2003 04:58:50 +0000	[thread overview]
Message-ID: <marc-linux-ia64-106964992902155@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-106881037208683@msgid-missing>

Christian Hinkelbein <hinkelbein@ti.uni-mannheim.de> wrote:
>
> David Mosberger schrieb:
> 
> >>>>>>On Fri, 14 Nov 2003 11:22:23 +0100, Christian Hinkelbein <hinkelbein@ti.uni-mannheim.de> said:
> > 
> >   Christian> On ia32 i succesfully do a lock_page() on every page
> >   Christian> returned by get_user_pages(), lateron i do unlock_page().
> >   Christian> On ia64 sometimes (on ia32 seemingly never) the first
> >   Christian> page is already locked, just after malloc().  For a quick
> >   Christian> hack ......
> > 
> > Umh, what page-size did you use?
> > 
> > In any case, a minimal test-program that reproduces the problem would
> > probably help you get an answer much faster.
> 
> Uuuh, thanks for the hint. It was the bigger page-size (16k) that 
> triggered an old bug in my driver.
> 

Your driver is still buggy - you usually cannot lock more that one page at
a time.  Trivial case: mmap the same page of a file at two consecutive
addresses and ask your driver to access that 2*PAGE_SIZE chunk of memory. 
It will deadlock.

If you wish to make sure that the pages don't go away then elevating their
refcount is sufficient.


      parent reply	other threads:[~2003-11-24  4:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-14 10:22 pages already locked on ia64 Christian Hinkelbein
2003-11-17 23:40 ` David Mosberger
2003-11-21 15:17 ` Christian Hinkelbein
2003-11-24  4:58 ` Andrew Morton [this message]

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=marc-linux-ia64-106964992902155@msgid-missing \
    --to=akpm@osdl.org \
    --cc=linux-ia64@vger.kernel.org \
    /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