From: "Jan Beulich" <JBeulich@novell.com>
To: "Tejun Heo" <tj@kernel.org>
Cc: <mingo@elte.hu>, <andi@firstfloor.org>, <tglx@linutronix.de>,
<linux-kernel@vger.kernel.org>, <hpa@zytor.com>
Subject: Re: [PATCH 3/5] x86: fix pageattr handling for remap percpu allocator
Date: Fri, 15 May 2009 08:58:30 +0100 [thread overview]
Message-ID: <4A0D3CC6020000780000108F@vpn.id2.novell.com> (raw)
In-Reply-To: <1242361739-21186-4-git-send-email-tj@kernel.org>
>>> Tejun Heo <tj@kernel.org> 15.05.09 06:28 >>>
>@@ -742,6 +744,27 @@ static int cpa_process_alias(struct cpa_data *cpa)
> }
> #endif
>
>+ /*
>+ * If the PMD page was partially used for per-cpu remapping,
>+ * the remapped area needs to be split and modified. Note
>+ * that the partial recycling only happens at the tail of a
>+ * partially used PMD page, so touching single PMD page is
>+ * always enough.
>+ */
>+ remapped = pcpu_pmd_remapped((void *)vaddr);
vaddr here is the passed-in address, but in order for the lookup to be positive
it needs to be the canonical address (i.e. the one pointing into the 1:1 mapping),
i.e. __va(cpa->pfn << PAGE_SHIFT), just like temp_cpa_vaddr gets calculated
earlier in the same function.
>+ if (remapped) {
>+ int max_pages = PFN_DOWN(PMD_SIZE - (vaddr & ~PMD_MASK));
>+
>+ alias_cpa = *cpa;
>+ temp_cpa_vaddr = (unsigned long)remapped;
>+ alias_cpa.vaddr = &temp_cpa_vaddr;
>+ alias_cpa.numpages = min(alias_cpa.numpages, max_pages);
>+ alias_cpa.flags &= ~(CPA_PAGES_ARRAY | CPA_ARRAY);
>+ ret = __change_page_attr_set_clr(&alias_cpa, 0);
>+ if (ret)
>+ return ret;
>+ }
>+
> return 0;
> }
Sorry for not having spotted this yesterday,
Jan
next prev parent reply other threads:[~2009-05-15 7:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-15 4:28 [GIT PATCH 2.6.30-rc5] x86,percpu: fix pageattr handling with remap allocator, take#2 Tejun Heo
2009-05-15 4:28 ` [PATCH 1/5] x86: prepare setup_pcpu_remap() for pageattr fix Tejun Heo
2009-05-15 4:28 ` [PATCH 2/5] x86: reorganize cpa_process_alias() Tejun Heo
2009-05-15 9:35 ` [PATCH UPDATED " Tejun Heo
2009-05-15 4:28 ` [PATCH 3/5] x86: fix pageattr handling for remap percpu allocator Tejun Heo
2009-05-15 7:58 ` Jan Beulich [this message]
2009-05-15 8:18 ` Tejun Heo
2009-05-15 9:35 ` [PATCH UPDATED " Tejun Heo
2009-05-15 4:28 ` [PATCH 4/5] x86: implement percpu_alloc kernel parameter Tejun Heo
2009-05-15 8:04 ` Jan Beulich
2009-05-15 9:27 ` Tejun Heo
2009-05-15 4:28 ` [PATCH 5/5] x86: ensure percpu remap doesn't consume too much vmalloc space Tejun Heo
2009-05-15 9:36 ` [GIT PATCH 2.6.30-rc5] x86,percpu: fix pageattr handling with remap allocator, take#2 Tejun Heo
2009-05-15 9:52 ` [GIT PATCH 2.6.30-rc5] x86,percpu: fix pageattr handling withremap " Jan Beulich
[not found] ` <4A0D57920200007800001150@novell.com>
2009-05-15 10:08 ` Tejun Heo
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=4A0D3CC6020000780000108F@vpn.id2.novell.com \
--to=jbeulich@novell.com \
--cc=andi@firstfloor.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=tj@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
all inboxes | Powered by JetHome®