From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
xen-devel@lists.xenproject.org,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Jork Loeser <Jork.Loeser@microsoft.com>,
KY Srinivasan <kys@microsoft.com>,
Stephen Hemminger <sthemmin@microsoft.com>,
Steven Rostedt <rostedt@goodmis.org>,
Juergen Gross <jgross@suse.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Andy Lutomirski <luto@amacapital.net>
Subject: Re: [PATCH v2] x86: enable RCU based table free
Date: Fri, 25 Aug 2017 09:10:46 +0200 [thread overview]
Message-ID: <87o9r4qg09.fsf@vitty.brq.redhat.com> (raw)
In-Reply-To: <878ti9rnom.fsf@vitty.brq.redhat.com> (Vitaly Kuznetsov's message of "Thu, 24 Aug 2017 17:27:21 +0200")
Vitaly Kuznetsov <vkuznets@redhat.com> writes:
> Peter Zijlstra <peterz@infradead.org> writes:
>
>> On Thu, Aug 24, 2017 at 11:22:58AM +0200, Vitaly Kuznetsov wrote:
>>
>>> diff --git a/arch/x86/include/asm/tlb.h b/arch/x86/include/asm/tlb.h
>>> index c7797307fc2b..d43a7fcafee9 100644
>>> --- a/arch/x86/include/asm/tlb.h
>>> +++ b/arch/x86/include/asm/tlb.h
>>> @@ -15,4 +15,9 @@
>>>
>>> #include <asm-generic/tlb.h>
>>>
>>> +static inline void __tlb_remove_table(void *table)
>>> +{
>>> + free_page_and_swap_cache(table);
>>> +}
>>
>> Most other archs have this in pgtable.h, only ARM* has it in tlb.h.
>>
>
> Sure, I can move it in v3 if nobody objects.
>
Well, turns out it is going to be a bit tricky.
free_page_and_swap_cache() is defined in linux/swap.h but we can't just
include it from arch/x86/include/asm/pgtable.h as pgtable.h itself is
included from swap.h:
...
In file included from ./include/linux/mm.h:70:0,
from ./include/linux/memcontrol.h:29,
from ./include/linux/swap.h:8,
from ./include/linux/suspend.h:4,
from arch/x86/kernel/asm-offsets.c:12:
./arch/x86/include/asm/pgtable.h: In function ‘__tlb_remove_table’:
./arch/x86/include/asm/pgtable.h:1252:2: error: implicit declaration of function ‘free_page_and_swap_cache’; did you mean ‘file_write_and_wait_range’? [-Werror=implicit-function-declaration]
free_page_and_swap_cache(table);
^~~~~~~~~~~~~~~~~~~~~~~~
...
An easy solution would be to make __tlb_remove_table() a define instead
of inline but personally I'd rather prefer to follow ARM and leave it in
tlb.h.
--
Vitaly
prev parent reply other threads:[~2017-08-25 7:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-24 9:22 Vitaly Kuznetsov
2017-08-24 9:49 ` Kirill A. Shutemov
2017-08-24 14:34 ` Peter Zijlstra
2017-08-24 15:27 ` Vitaly Kuznetsov
2017-08-24 16:06 ` Peter Zijlstra
2017-08-25 7:10 ` Vitaly Kuznetsov [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=87o9r4qg09.fsf@vitty.brq.redhat.com \
--to=vkuznets@redhat.com \
--cc=Jork.Loeser@microsoft.com \
--cc=andrew.cooper3@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=hpa@zytor.com \
--cc=jgross@suse.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sthemmin@microsoft.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.org \
--cc=xen-devel@lists.xenproject.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®