mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Bret Towe" <magnade@gmail.com>
To: "Nick Piggin" <npiggin@suse.de>
Cc: "Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Benjamin Herrenschmidt" <benh@kernel.crashing.org>,
	airlied@gmail.com
Subject: Re: [patch] agp: don't lock pages
Date: Wed, 25 Jul 2007 11:44:18 -0700	[thread overview]
Message-ID: <dda83e780707251144w5041d393r4d93291daba1d4be@mail.gmail.com> (raw)
In-Reply-To: <20070725111922.GF29011@wotan.suse.de>

On 7/25/07, Nick Piggin <npiggin@suse.de> wrote:
> Hi,
>
> Does this patch solve the X problem? Does anyone see anything wrong
> with it or know why agp was locking the pages?

Yeap the mac mini is happy again
Thanks

> --
> AGP should not need to lock pages. They are not protecting any race
> because there is no lock_page calls, only SetPageLocked.
>
> This is causing hangs with d00806b183152af6d24f46f0c33f14162ca1262a.
>
> Signed-off-by: Nick Piggin <npiggin@suse.de>
>
> diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c
> index d535c40..3db4f40 100644
> --- a/drivers/char/agp/generic.c
> +++ b/drivers/char/agp/generic.c
> @@ -1170,7 +1170,6 @@ void *agp_generic_alloc_page(struct agp_
>         map_page_into_agp(page);
>
>         get_page(page);
> -       SetPageLocked(page);
>         atomic_inc(&agp_bridge->current_memory_agp);
>         return page_address(page);
>  }
> @@ -1187,7 +1186,6 @@ void agp_generic_destroy_page(void *addr
>         page = virt_to_page(addr);
>         unmap_page_from_agp(page);
>         put_page(page);
> -       unlock_page(page);
>         free_page((unsigned long)addr);
>         atomic_dec(&agp_bridge->current_memory_agp);
>  }
> diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
> index a124060..2f319f4 100644
> --- a/drivers/char/agp/intel-agp.c
> +++ b/drivers/char/agp/intel-agp.c
> @@ -213,7 +213,6 @@ static void *i8xx_alloc_pages(void)
>         }
>         global_flush_tlb();
>         get_page(page);
> -       SetPageLocked(page);
>         atomic_inc(&agp_bridge->current_memory_agp);
>         return page_address(page);
>  }
> @@ -229,7 +228,6 @@ static void i8xx_destroy_pages(void *add
>         change_page_attr(page, 4, PAGE_KERNEL);
>         global_flush_tlb();
>         put_page(page);
> -       unlock_page(page);
>         __free_pages(page, 2);
>         atomic_dec(&agp_bridge->current_memory_agp);
>  }
> diff --git a/drivers/char/agp/sgi-agp.c b/drivers/char/agp/sgi-agp.c
> index cda608c..98cf8ab 100644
> --- a/drivers/char/agp/sgi-agp.c
> +++ b/drivers/char/agp/sgi-agp.c
> @@ -51,7 +51,6 @@ static void *sgi_tioca_alloc_page(struct
>                 return NULL;
>
>         get_page(page);
> -       SetPageLocked(page);
>         atomic_inc(&agp_bridge->current_memory_agp);
>         return page_address(page);
>  }
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>

  reply	other threads:[~2007-07-25 18:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-25 11:19 Nick Piggin
2007-07-25 18:44 ` Bret Towe [this message]
2007-07-25 21:26 ` Benjamin Herrenschmidt
2007-07-26  0:41   ` Nick Piggin
2007-07-26  0:42     ` Nick Piggin
2007-07-26  1:44     ` Dave Airlie
2007-07-26  2:07       ` Nick Piggin

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=dda83e780707251144w5041d393r4d93291daba1d4be@mail.gmail.com \
    --to=magnade@gmail.com \
    --cc=airlied@gmail.com \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=npiggin@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®