From: Thomas Gleixner
The kvmclock parameter is init data and the other variables are not
modified after init.
Signed-off-by: Thomas Gleixner
Signed-off-by: Pavel Tatashin
Acked-by: Paolo Bonzini
---
arch/x86/kernel/kvmclock.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions
in keeping it
around.
- Convert to pr_info()
Signed-off-by: Thomas Gleixner
Signed-off-by: Pavel Tatashin
Acked-by: Paolo Bonzini
---
arch/x86/kernel/kvmclock.c | 76 --
1 file changed, 23 insertions(+), 53 deletions(-)
diff --git a/arch/x86/kernel/kvmclock.c b
It is expected for sched_clock() to output data from 0, when system boots.
Add an offset xen_sched_clock_offset (similarly how it is done in other
hypervisors i.e. kvm_sched_clock_offset) to count sched_clock() from 0,
when time is first initialized.
Signed-off-by: Pavel Tatashin
---
arch/x86
value.
This is why there is no reason to keep notsc, and it can be removed. But,
for compatibility reasons we will keep this parameter but change its
definition to be the same as tsc=unstable.
Signed-off-by: Pavel Tatashin
Reviewed-by: Dou Liyang
Reviewed-by: Thomas Gleixner
---
.../admin-guide
ialized during handover from memblock.
Use text_poke_early() in static branching until early boot IRQs are
enabled, at which time switch to text_poke. Also, ensure text_poke() is
never invoked when unitialized memory access may happen by using:
BUG_ON(!after_bootmem); assertion.
Signed-off-by:
-by: Pavel Tatashin
Acked-by: Paolo Bonzini
---
arch/x86/kernel/kvmclock.c | 99 --
1 file changed, 62 insertions(+), 37 deletions(-)
diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c
index 08e7726a5e62..ed170171fe49 100644
--- a/arch/x86/kernel
value.
This is why there is no reason to keep notsc, and it can be removed. But,
for compatibility reasons we will keep this parameter but change its
definition to be the same as tsc=unstable.
Signed-off-by: Pavel Tatashin
Reviewed-by: Dou Liyang
Reviewed-by: Thomas Gleixner
---
.../admin-guide
ialized during handover from memblock.
Use text_poke_early() in static branching until early boot IRQs are
enabled, at which time switch to text_poke. Also, ensure text_poke() is
never invoked when unitialized memory access may happen by using:
BUG_ON(!after_bootmem); assertion.
Signed-off-by:
-by: Pavel Tatashin
Acked-by: Paolo Bonzini
---
arch/x86/kernel/kvmclock.c | 99 --
1 file changed, 62 insertions(+), 37 deletions(-)
diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c
index 08e7726a5e62..ed170171fe49 100644
--- a/arch/x86/kernel
of
read_persistent_clock64()
Signed-off-by: Pavel Tatashin
Reviewed-by: Martin Schwidefsky
---
arch/s390/kernel/time.c | 18 ++
1 file changed, 18 insertions(+)
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
index cf561160ea88..d1f5447d5687 100644
--- a/arch/s390/kernel/time.c
+++ b
From: Peter Zijlstra
If the host gives us a TSC rate, assume it is good and don't try and
recalibrate things against virtual timer hardware.
Signed-off-by: Peter Zijlstra (Intel)
Signed-off-by: Pavel Tatashin
---
arch/x86/kernel/kvmclock.c | 11 ++-
1 file changed, 10 insertions
of the clock
- Remove dependency on memblock, and reduce code
The downside:
- Static allocation of the per cpu data structures sized NR_CPUS * 64byte
Will be addressed in follow up patches.
[ tglx: Split out from larger series ]
Signed-off-by: Pavel Tatashin
Signed-off-by: Thomas Gleixner
sched_clock_running may be read every time sched_clock_cpu() is called.
Yet, this variable is updated only twice during boot, and never changes
again, therefore it is better to make it a static key.
Signed-off-by: Pavel Tatashin
---
kernel/sched/clock.c | 16
kernel/sched
of
read_persistent_clock64()
Signed-off-by: Pavel Tatashin
Reviewed-by: Martin Schwidefsky
---
arch/s390/kernel/time.c | 18 ++
1 file changed, 18 insertions(+)
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
index cf561160ea88..d1f5447d5687 100644
--- a/arch/s390/kernel/time.c
+++ b
From: Peter Zijlstra
If the host gives us a TSC rate, assume it is good and don't try and
recalibrate things against virtual timer hardware.
Signed-off-by: Peter Zijlstra (Intel)
Signed-off-by: Pavel Tatashin
---
arch/x86/kernel/kvmclock.c | 11 ++-
1 file changed, 10 insertions
of the clock
- Remove dependency on memblock, and reduce code
The downside:
- Static allocation of the per cpu data structures sized NR_CPUS * 64byte
Will be addressed in follow up patches.
[ tglx: Split out from larger series ]
Signed-off-by: Pavel Tatashin
Signed-off-by: Thomas Gleixner
sched_clock_running may be read every time sched_clock_cpu() is called.
Yet, this variable is updated only twice during boot, and never changes
again, therefore it is better to make it a static key.
Signed-off-by: Pavel Tatashin
---
kernel/sched/clock.c | 16
kernel/sched
atch/10021247/
- If early boot timestamps were available, the engineer who introduced
this bug would have noticed the extra time that is spent early in boot.
Pavel Tatashin (7):
x86/tsc: remove tsc_disabled flag
time: sync read_boot_clock64() with persistent clock
x86/time: read_boot_clock64() impl
From: Thomas Gleixner
The return value is pointless because the wrmsr cannot fail if
KVM_FEATURE_CLOCKSOURCE or KVM_FEATURE_CLOCKSOURCE2 are set.
kvm_register_clock() is only called locally so wants to be static.
Signed-off-by: Thomas Gleixner
Signed-off-by: Pavel Tatashin
Acked-by: Paolo
From: Thomas Gleixner
There is no requirement for wall_clock data to be page aligned or page
sized.
Signed-off-by: Thomas Gleixner
Signed-off-by: Pavel Tatashin
Acked-by: Paolo Bonzini
---
arch/x86/kernel/kvmclock.c | 12
1 file changed, 4 insertions(+), 8 deletions(-)
diff
atch/10021247/
- If early boot timestamps were available, the engineer who introduced
this bug would have noticed the extra time that is spent early in boot.
Pavel Tatashin (7):
x86/tsc: remove tsc_disabled flag
time: sync read_boot_clock64() with persistent clock
x86/time: read_boot_clock64() impl
From: Thomas Gleixner
The return value is pointless because the wrmsr cannot fail if
KVM_FEATURE_CLOCKSOURCE or KVM_FEATURE_CLOCKSOURCE2 are set.
kvm_register_clock() is only called locally so wants to be static.
Signed-off-by: Thomas Gleixner
Signed-off-by: Pavel Tatashin
Acked-by: Paolo
From: Thomas Gleixner
There is no requirement for wall_clock data to be page aligned or page
sized.
Signed-off-by: Thomas Gleixner
Signed-off-by: Pavel Tatashin
Acked-by: Paolo Bonzini
---
arch/x86/kernel/kvmclock.c | 12
1 file changed, 4 insertions(+), 8 deletions(-)
diff
> > +static u64 xen_sched_clock(void)
> > +{
> > + return xen_clocksource_read() - xen_sched_clock_offset;
> > +}
>
>
> Should other invocations of xen_clocksource_read() also be offset?
>
I do not believe so. Look in arch/x86/kernel/kvmclock.c
kvm_clock_get_cycles() is not normalized for
> > +static u64 xen_sched_clock(void)
> > +{
> > + return xen_clocksource_read() - xen_sched_clock_offset;
> > +}
>
>
> Should other invocations of xen_clocksource_read() also be offset?
>
I do not believe so. Look in arch/x86/kernel/kvmclock.c
kvm_clock_get_cycles() is not normalized for
> > + set_fixmap(FIX_PARAVIRT_BOOTMAP, xen_start_info->shared_info);
> > + HYPERVISOR_shared_info = (void *)fix_to_virt(FIX_PARAVIRT_BOOTMAP);
> > +
> > + /* xen clock uses per-cpu vcpu_info, need to init it for boot cpu */
> > + xen_vcpu_info_reset(0);
>
>
> I don't believe this
> > + set_fixmap(FIX_PARAVIRT_BOOTMAP, xen_start_info->shared_info);
> > + HYPERVISOR_shared_info = (void *)fix_to_virt(FIX_PARAVIRT_BOOTMAP);
> > +
> > + /* xen clock uses per-cpu vcpu_info, need to init it for boot cpu */
> > + xen_vcpu_info_reset(0);
>
>
> I don't believe this
>
> Oops, yes, my mistake. I will test the patchset with Thomas's kvm patch
> for you.
Thank you Dou. Please wait for updated series before you test it. I
will include patches from Thomas in the updated series.
Thank you,
Pavel
>
> Oops, yes, my mistake. I will test the patchset with Thomas's kvm patch
> for you.
Thank you Dou. Please wait for updated series before you test it. I
will include patches from Thomas in the updated series.
Thank you,
Pavel
Now, that both variants of sparse memory use the same buffers to populate
memory map, we can move sparse_buffer_init()/sparse_buffer_fini() to the
common place.
Signed-off-by: Pavel Tatashin
---
include/linux/mm.h | 3 ---
mm/sparse-vmemmap.c | 2 --
mm/sparse.c | 14
Now, that both variants of sparse memory use the same buffers to populate
memory map, we can move sparse_buffer_init()/sparse_buffer_fini() to the
common place.
Signed-off-by: Pavel Tatashin
---
include/linux/mm.h | 3 ---
mm/sparse-vmemmap.c | 2 --
mm/sparse.c | 14
non-vmemmap sparse also allocated large contiguous chunk of memory, and if
fails falls back to smaller allocations. Use the same functions to
allocate buffer as the vmemmap-sparse
Signed-off-by: Pavel Tatashin
---
mm/sparse.c | 41 ++---
1 file changed, 14
non-vmemmap sparse also allocated large contiguous chunk of memory, and if
fails falls back to smaller allocations. Use the same functions to
allocate buffer as the vmemmap-sparse
Signed-off-by: Pavel Tatashin
---
mm/sparse.c | 41 ++---
1 file changed, 14
-off-by: Pavel Tatashin
Reviewed-by: Oscar Salvador
---
mm/sparse.c | 85 +
1 file changed, 85 insertions(+)
diff --git a/mm/sparse.c b/mm/sparse.c
index 20ca292d8f11..248d5d7bbf55 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -200,6 +200,11
Rename new_sparse_init() to sparse_init() which enables it. Delete old
sparse_init() and all the code that became obsolete with.
Signed-off-by: Pavel Tatashin
Tested-by: Michael Ellerman (powerpc)
---
include/linux/mm.h | 6 --
mm/Kconfig | 4 -
mm/sparse-vmemmap.c | 21
-vmemmap.c because
later we will use them for non-vmemmap sparse allocations as well.
Signed-off-by: Pavel Tatashin
---
include/linux/mm.h | 4
mm/sparse-vmemmap.c | 40 ++--
mm/sparse.c | 45 -
3 files
-off-by: Pavel Tatashin
Reviewed-by: Oscar Salvador
---
mm/sparse.c | 85 +
1 file changed, 85 insertions(+)
diff --git a/mm/sparse.c b/mm/sparse.c
index 20ca292d8f11..248d5d7bbf55 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -200,6 +200,11
Rename new_sparse_init() to sparse_init() which enables it. Delete old
sparse_init() and all the code that became obsolete with.
Signed-off-by: Pavel Tatashin
Tested-by: Michael Ellerman (powerpc)
---
include/linux/mm.h | 6 --
mm/Kconfig | 4 -
mm/sparse-vmemmap.c | 21
-vmemmap.c because
later we will use them for non-vmemmap sparse allocations as well.
Signed-off-by: Pavel Tatashin
---
include/linux/mm.h | 4
mm/sparse-vmemmap.c | 40 ++--
mm/sparse.c | 45 -
3 files
-1-...@redhat.com
The buffers are large enough to cause machine stop to boot on small memory
systems.
Another benefit of these changes is that they also obsolete
CONFIG_SPARSEMEM_ALLOC_MEM_MAP_TOGETHER.
Pavel Tatashin (5):
mm/sparse: abstract sparse buffer allocations
mm/sparse: use the new
-1-...@redhat.com
The buffers are large enough to cause machine stop to boot on small memory
systems.
Another benefit of these changes is that they also obsolete
CONFIG_SPARSEMEM_ALLOC_MEM_MAP_TOGETHER.
Pavel Tatashin (5):
mm/sparse: abstract sparse buffer allocations
mm/sparse: use the new
On 07/16/2018 12:09 PM, Michal Hocko wrote:
> On Mon 16-07-18 11:16:30, Pavel Tatashin wrote:
>> Moving zero_resv_unavail before memmap_init_zone(), caused a regression on
>> x86-32.
>>
>> The cause is that we access struct pages before they are allocated when
On 07/16/2018 12:09 PM, Michal Hocko wrote:
> On Mon 16-07-18 11:16:30, Pavel Tatashin wrote:
>> Moving zero_resv_unavail before memmap_init_zone(), caused a regression on
>> x86-32.
>>
>> The cause is that we access struct pages before they are allocated when
I have posted a patch for the above issue:
http://lkml.kernel.org/r/20180716151630.770-1-pasha.tatas...@oracle.com
On Mon, Jul 16, 2018 at 9:15 AM Pavel Tatashin
wrote:
>
> I have figured out what is going with x86-32. Since it has FLATMEM
> memory layout, the memmap is now alloca
I have posted a patch for the above issue:
http://lkml.kernel.org/r/20180716151630.770-1-pasha.tatas...@oracle.com
On Mon, Jul 16, 2018 at 9:15 AM Pavel Tatashin
wrote:
>
> I have figured out what is going with x86-32. Since it has FLATMEM
> memory layout, the memmap is now alloca
navail() here.
Fixes: e181ae0c5db9 ("mm: zero unavailable pages before memmap init")
Signed-off-by: Pavel Tatashin
---
include/linux/mm.h | 2 +-
mm/page_alloc.c| 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
in
navail() here.
Fixes: e181ae0c5db9 ("mm: zero unavailable pages before memmap init")
Signed-off-by: Pavel Tatashin
---
include/linux/mm.h | 2 +-
mm/page_alloc.c| 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
in
On Mon, Jul 16, 2018 at 5:33 AM Dou Liyang wrote:
>
>
>
> At 07/13/2018 07:30 PM, Pavel Tatashin wrote:
> > On Fri, Jul 13, 2018 at 3:24 AM Dou Liyang
> > wrote:
> >>
> >>
> >> At 07/12/2018 08:04 AM, Pavel Tatashin wro
On Mon, Jul 16, 2018 at 5:33 AM Dou Liyang wrote:
>
>
>
> At 07/13/2018 07:30 PM, Pavel Tatashin wrote:
> > On Fri, Jul 13, 2018 at 3:24 AM Dou Liyang
> > wrote:
> >>
> >>
> >> At 07/12/2018 08:04 AM, Pavel Tatashin wro
(), but that will require more
thinking, on how to ensure that no section in memmap is skipped while
we go through memmap_init_zone().
Should I submit an updated patch for "mm: zero unavailable pages
before memmap init", or just this incremental fix?
Thank you,
Pavel
On Mon, Jul 16, 2018 at 7:56 AM Pave
(), but that will require more
thinking, on how to ensure that no section in memmap is skipped while
we go through memmap_init_zone().
Should I submit an updated patch for "mm: zero unavailable pages
before memmap init", or just this incremental fix?
Thank you,
Pavel
On Mon, Jul 16, 2018 at 7:56 AM Pave
2f491a Merge branch 'i2c/for-current' of
> > > git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
> > > Bad:f353078f028f Merge branch 'akpm' (patches from Andrew)
> > > Found: e181ae0c5db9 mm: zero unavailable pages before memmap init
> > >
>
2f491a Merge branch 'i2c/for-current' of
> > > git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
> > > Bad:f353078f028f Merge branch 'akpm' (patches from Andrew)
> > > Found: e181ae0c5db9 mm: zero unavailable pages before memmap init
> > >
>
On 07/13/2018 06:51 PM, Thomas Gleixner wrote:
> On Wed, 11 Jul 2018, Pavel Tatashin wrote:
>
>>> So this still will have some overhead when kvmclock is not in use, but
>>> bringing it down to zero would be a massive trainwreck and even more
>>> indirecti
On 07/13/2018 06:51 PM, Thomas Gleixner wrote:
> On Wed, 11 Jul 2018, Pavel Tatashin wrote:
>
>>> So this still will have some overhead when kvmclock is not in use, but
>>> bringing it down to zero would be a massive trainwreck and even more
>>> indirecti
On 07/13/2018 09:17 AM, Oscar Salvador wrote:
> On Thu, Jul 12, 2018 at 04:37:26PM -0400, Pavel Tatashin wrote:
>> +static void *sparsemap_buf __meminitdata;
>> +static void *sparsemap_buf_end __meminitdata;
>> +
>> +void __init sparse_buffer_init(
On 07/13/2018 09:17 AM, Oscar Salvador wrote:
> On Thu, Jul 12, 2018 at 04:37:26PM -0400, Pavel Tatashin wrote:
>> +static void *sparsemap_buf __meminitdata;
>> +static void *sparsemap_buf_end __meminitdata;
>> +
>> +void __init sparse_buffer_init(
> > Signed-off-by: Pavel Tatashin
>
> Looks good to me, and it will make the code much shorter/easier.
>
> Reviewed-by: Oscar Salvador
>
Thank you!
Pave
> > Signed-off-by: Pavel Tatashin
>
> Looks good to me, and it will make the code much shorter/easier.
>
> Reviewed-by: Oscar Salvador
>
Thank you!
Pave
On Fri, Jul 13, 2018 at 5:13 AM Dou Liyang wrote:
>
>
>
> At 07/12/2018 08:04 AM, Pavel Tatashin wrote:
> > cyc2ns converts tsc to nanoseconds, and it is handled in a per-cpu data
> > structure.
> >
> > Currently, the setup code for c2ns data for every po
On Fri, Jul 13, 2018 at 5:13 AM Dou Liyang wrote:
>
>
>
> At 07/12/2018 08:04 AM, Pavel Tatashin wrote:
> > cyc2ns converts tsc to nanoseconds, and it is handled in a per-cpu data
> > structure.
> >
> > Currently, the setup code for c2ns data for every po
On Fri, Jul 13, 2018 at 3:24 AM Dou Liyang wrote:
>
>
> At 07/12/2018 08:04 AM, Pavel Tatashin wrote:
> > During boot tsc is calibrated twice: once in tsc_early_delay_calibrate(),
> > and the second time in tsc_init().
> >
> > Rename tsc_early_delay_calibrate(
On Fri, Jul 13, 2018 at 3:24 AM Dou Liyang wrote:
>
>
> At 07/12/2018 08:04 AM, Pavel Tatashin wrote:
> > During boot tsc is calibrated twice: once in tsc_early_delay_calibrate(),
> > and the second time in tsc_init().
> >
> > Rename tsc_early_delay_calibrate(
On Fri, Jul 13, 2018 at 5:09 AM Oscar Salvador
wrote:
>
>
> > -#ifdef CONFIG_SPARSEMEM_ALLOC_MEM_MAP_TOGETHER
> > -static void __init sparse_early_mem_maps_alloc_node(void *data,
> > - unsigned long pnum_begin,
> > - unsigned long
On Fri, Jul 13, 2018 at 5:09 AM Oscar Salvador
wrote:
>
>
> > -#ifdef CONFIG_SPARSEMEM_ALLOC_MEM_MAP_TOGETHER
> > -static void __init sparse_early_mem_maps_alloc_node(void *data,
> > - unsigned long pnum_begin,
> > - unsigned long
> About PPC64, your patchset fixes the issue as the population gets followed by
> a
> sparse_init_one_section().
>
> It can be seen here:
>
> Before:
>
> kernel: vmemmap_populate f000..f0004000, node 0
> kernel: * f000..f001 allocated at
>
> About PPC64, your patchset fixes the issue as the population gets followed by
> a
> sparse_init_one_section().
>
> It can be seen here:
>
> Before:
>
> kernel: vmemmap_populate f000..f0004000, node 0
> kernel: * f000..f001 allocated at
>
> -void __ref xen_init_time_ops(void)
> +void __init xen_init_time_ops(void)
> {
> pv_time_ops = xen_time_ops;
>
> @@ -542,17 +542,11 @@ void __init xen_hvm_init_time_ops(void)
> return;
>
> if (!xen_feature(XENFEAT_hvm_safe_pvclock)) {
> -
> -void __ref xen_init_time_ops(void)
> +void __init xen_init_time_ops(void)
> {
> pv_time_ops = xen_time_ops;
>
> @@ -542,17 +542,11 @@ void __init xen_hvm_init_time_ops(void)
> return;
>
> if (!xen_feature(XENFEAT_hvm_safe_pvclock)) {
> -
non-vmemmap sparse also allocated large contiguous chunk of memory, and if
fails falls back to smaller allocations. Use the same functions to allocate
buffer as the vmemmap-sparse
Signed-off-by: Pavel Tatashin
---
mm/sparse.c | 41 ++---
1 file changed, 14
CONFIG_SPARSEMEM_ALLOC_MEM_MAP_TOGETHER.
Pavel Tatashin (5):
mm/sparse: abstract sparse buffer allocations
mm/sparse: use the new sparse buffer functions in non-vmemmap
mm/sparse: move buffer init/fini to the common place
mm/sparse: add new sparse_init_nid() and sparse_init()
mm/sparse: delete old
CONFIG_SPARSEMEM_ALLOC_MEM_MAP_TOGETHER.
Pavel Tatashin (5):
mm/sparse: abstract sparse buffer allocations
mm/sparse: use the new sparse buffer functions in non-vmemmap
mm/sparse: move buffer init/fini to the common place
mm/sparse: add new sparse_init_nid() and sparse_init()
mm/sparse: delete old
non-vmemmap sparse also allocated large contiguous chunk of memory, and if
fails falls back to smaller allocations. Use the same functions to allocate
buffer as the vmemmap-sparse
Signed-off-by: Pavel Tatashin
---
mm/sparse.c | 41 ++---
1 file changed, 14
Now, that both variants of sparse memory use the same buffers to populate
memory map, we can move sparse_buffer_init()/sparse_buffer_fini() to the
common place.
Signed-off-by: Pavel Tatashin
---
include/linux/mm.h | 3 ---
mm/sparse-vmemmap.c | 2 --
mm/sparse.c | 14
Now, that both variants of sparse memory use the same buffers to populate
memory map, we can move sparse_buffer_init()/sparse_buffer_fini() to the
common place.
Signed-off-by: Pavel Tatashin
---
include/linux/mm.h | 3 ---
mm/sparse-vmemmap.c | 2 --
mm/sparse.c | 14
Rename new_sparse_init() to sparse_init() which enables it. Delete old
sparse_init() and all the code that became obsolete with.
Signed-off-by: Pavel Tatashin
---
include/linux/mm.h | 6 --
mm/Kconfig | 4 -
mm/sparse-vmemmap.c | 21 -
mm/sparse.c | 217
-vmemmap.c because
later we will use them for non-vmemmap sparse allocations as well.
Signed-off-by: Pavel Tatashin
---
include/linux/mm.h | 4
mm/sparse-vmemmap.c | 40 ++--
mm/sparse.c | 45 -
3 files
-off-by: Pavel Tatashin
---
mm/sparse.c | 85 +
1 file changed, 85 insertions(+)
diff --git a/mm/sparse.c b/mm/sparse.c
index 01c616342909..4087b94afddf 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -200,6 +200,11 @@ static inline int
-vmemmap.c because
later we will use them for non-vmemmap sparse allocations as well.
Signed-off-by: Pavel Tatashin
---
include/linux/mm.h | 4
mm/sparse-vmemmap.c | 40 ++--
mm/sparse.c | 45 -
3 files
-off-by: Pavel Tatashin
---
mm/sparse.c | 85 +
1 file changed, 85 insertions(+)
diff --git a/mm/sparse.c b/mm/sparse.c
index 01c616342909..4087b94afddf 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -200,6 +200,11 @@ static inline int
Rename new_sparse_init() to sparse_init() which enables it. Delete old
sparse_init() and all the code that became obsolete with.
Signed-off-by: Pavel Tatashin
---
include/linux/mm.h | 6 --
mm/Kconfig | 4 -
mm/sparse-vmemmap.c | 21 -
mm/sparse.c | 217
me:
Reviewed-by: Pavel Tatashin
me:
Reviewed-by: Pavel Tatashin
(_clock[0].pvti);
> - if (!(flags & PVCLOCK_TSC_STABLE_BIT))
> - return 1;
> -
> - pvclock_set_pvti_cpu0_va(hv_clock);
> - kvm_clock.archdata.vclock_mode = VCLOCK_PVCLOCK;
> -#endif
> - return 0;
> -}
I am not sure what the point of moving this function. The patch would
be much smaller without it.
Reviewed-by: Pavel Tatashin
(_clock[0].pvti);
> - if (!(flags & PVCLOCK_TSC_STABLE_BIT))
> - return 1;
> -
> - pvclock_set_pvti_cpu0_va(hv_clock);
> - kvm_clock.archdata.vclock_mode = VCLOCK_PVCLOCK;
> -#endif
> - return 0;
> -}
I am not sure what the point of moving this function. The patch would
be much smaller without it.
Reviewed-by: Pavel Tatashin
On Fri, Jul 6, 2018 at 12:25 PM Thomas Gleixner wrote:
>
> The kvmclock parameter is init data and the other variables are not
> modified after init.
LGTM:
Reviewed-by: Pavel Tatashin
On Fri, Jul 6, 2018 at 12:25 PM Thomas Gleixner wrote:
>
> The kvmclock parameter is init data and the other variables are not
> modified after init.
LGTM:
Reviewed-by: Pavel Tatashin
_time_info *)hv_clock_mem;
> + kvm_register_clock("primary cpu clock");
Otherwise,
Reviewed-by: Pavel Tatashin
_time_info *)hv_clock_mem;
> + kvm_register_clock("primary cpu clock");
Otherwise,
Reviewed-by: Pavel Tatashin
On Fri, Jul 6, 2018 at 12:26 PM Thomas Gleixner wrote:
>
> There is no requirement for wall_clock data to be page aligned or page
> sized.
>
Reviewed-by: Pavel Tatashin
On Fri, Jul 6, 2018 at 12:26 PM Thomas Gleixner wrote:
>
> There is no requirement for wall_clock data to be page aligned or page
> sized.
>
Reviewed-by: Pavel Tatashin
> So this still will have some overhead when kvmclock is not in use, but
> bringing it down to zero would be a massive trainwreck and even more
> indirections.
Hi Thomas,
In my opinion, having kvmclock page in __initdata for boot cpu, and
setup it in init_hypervisor_platform(). Later, switch to
> So this still will have some overhead when kvmclock is not in use, but
> bringing it down to zero would be a massive trainwreck and even more
> indirections.
Hi Thomas,
In my opinion, having kvmclock page in __initdata for boot cpu, and
setup it in init_hypervisor_platform(). Later, switch to
().
Sometimes it is not possible to determine tsc early, as the subsystem that
is required is not yet initialized, in such case try again later in
tsc_init().
Suggested-by: Thomas Gleixner
Signed-off-by: Pavel Tatashin
---
arch/x86/include/asm/tsc.h | 2 +-
arch/x86/kernel/setup.c| 2 +-
arch
().
Sometimes it is not possible to determine tsc early, as the subsystem that
is required is not yet initialized, in such case try again later in
tsc_init().
Suggested-by: Thomas Gleixner
Signed-off-by: Pavel Tatashin
---
arch/x86/include/asm/tsc.h | 2 +-
arch/x86/kernel/setup.c| 2 +-
arch
ialized during handover from memblock.
Use text_poke_early() in static branching until early boot IRQs are
enabled, at which time switch to text_poke. Also, ensure text_poke() is
never invoked when unitialized memory access may happen by using:
BUG_ON(!after_bootmem); assertion.
Signed-off-by:
time_init().
Suggested-by: Peter Zijlstra
Signed-off-by: Pavel Tatashin
---
include/linux/sched_clock.h | 5 ++---
init/main.c | 4 ++--
kernel/sched/clock.c| 26 --
kernel/sched/core.c | 1 -
kernel/time/sched_clock.c | 2 +-
5 files
sched_clock_running may be read every time sched_clock_cpu() is called.
Yet, this variable is updated only twice during boot, and never changes
again, therefore it is better to make it a static key.
Signed-off-by: Pavel Tatashin
---
kernel/sched/clock.c | 16
kernel/sched
ialized during handover from memblock.
Use text_poke_early() in static branching until early boot IRQs are
enabled, at which time switch to text_poke. Also, ensure text_poke() is
never invoked when unitialized memory access may happen by using:
BUG_ON(!after_bootmem); assertion.
Signed-off-by:
time_init().
Suggested-by: Peter Zijlstra
Signed-off-by: Pavel Tatashin
---
include/linux/sched_clock.h | 5 ++---
init/main.c | 4 ++--
kernel/sched/clock.c| 26 --
kernel/sched/core.c | 1 -
kernel/time/sched_clock.c | 2 +-
5 files
801 - 900 of 2213 matches
Mail list logo