All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bernd Harries <bha@gmx.de>
To: mingo@elte.hu
Cc: Bernd Harries <mlbha@gmx.de>, linux-kernel@vger.kernel.org
Subject: Re: __get_free_pages(): is the MEM really mine?
Date: Sat, 29 Sep 2001 19:15:25 +0200	[thread overview]
Message-ID: <3BB601AD.8890EA1D@gmx.de> (raw)
In-Reply-To: <Pine.LNX.4.33.0109271454560.5435-100000@localhost.localdomain>

Greetings from the 2001 Linux Devel meeting in Oldenburg!

Roman Zippel looked at my driver and added code to print the usage 
counter for each page after a 9-order __get_free_pages().

We found that only the first (!) page has a count of 1, the others have 0!

That would cover my impression, that only the 1st page is really mine...

Roman found that strange and added this:

          struct page * page = virt_to_page(card_ptr->dma_blk1[n]);
          int i;
          for(i = 0; i < (1 << max_order); i++, page++)
          {
            atomic_set(&page->count, 1);
          }

And the freeing of the pages is now done page by page in the _vma_close()
function.

I will now test the version but I have only a 1-CPU box here. On an SMP Box I
could imagine that even between __get_free_pages() and the
atomic_set(&page->count, 1) someone else already uses my pages.

Could you please comment on this?

Thanks,
-- 
Bernd Harries

bha@gmx.de           http://www.freeyellow.com/members/bharries
bha@nikocity.de       Tel. +49 421 809 7343 priv.  | MSB First!
harries@stn-atlas.de       +49 421 457 3966 offi.  | Linux-m68k
bernd@linux-m68k.org      8.48'21" E  52.48'52" N  | Medusa T40

  reply	other threads:[~2001-09-29 17:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-27 10:06 __get_free_pages(): is the MEM really mine? Bernd Harries
2001-09-27 13:00 ` Ingo Molnar
2001-09-29 17:15   ` Bernd Harries [this message]
2001-09-30  7:27     ` Ingo Molnar
2001-09-30 12:59       ` Bernd Harries
2001-10-01  5:55         ` Ingo Molnar
2001-10-05  8:49           ` Bernd Harries
  -- strict thread matches above, loose matches on Subject: below --
2001-10-01 11:33 Bernd Harries
2001-10-05 12:55 ` Hugh Dickins
2001-10-05 13:32   ` Bernd Harries
2001-10-05 15:27     ` Hugh Dickins
2001-09-27 14:19 Bernd Harries
2001-09-27  8:56 Bernd Harries
2001-09-27  9:15 ` Ingo Molnar
2001-09-27  9:20 ` Ingo Molnar
2001-09-27 14:38 ` Eric W. Biederman
2001-09-29  7:32   ` Bernd Harries

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=3BB601AD.8890EA1D@gmx.de \
    --to=bha@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mlbha@gmx.de \
    /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 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.