Yoshinori Sato
> Cc: Rich Felker
> Cc: Dave Hansen
> Cc: Andy Lutomirski
> Cc: Peter Zijlstra
> Cc: Thomas Gleixner
> Cc: Ingo Molnar
> Cc: Borislav Petkov
> Cc: "H. Peter Anvin"
> Cc: Greg Kroah-Hartman
> Cc: "Rafael J. Wysocki"
> Cc:
On Mon 27-05-19 13:11:46, David Hildenbrand wrote:
> We'll rework hotplug_memory_register() shortly, so it no longer consumes
> pass a section.
>
> Cc: Greg Kroah-Hartman
> Cc: "Rafael J. Wysocki"
> Signed-off-by: David Hildenbrand
Acked-by: Michal Hocko
&g
hwidefsky
> Cc: Heiko Carstens
> Cc: Andrew Morton
> Cc: Michal Hocko
> Cc: Mike Rapoport
> Cc: David Hildenbrand
> Cc: Vasily Gorbik
> Cc: Oscar Salvador
> Signed-off-by: David Hildenbrand
> ---
> arch/s390/mm/init.c | 13 +++--
> 1 file changed,
e the case for other arches which support hotplug. I do not see
much point in adding warning to each of them.
> Cc: Martin Schwidefsky
> Cc: Heiko Carstens
> Cc: Andrew Morton
> Cc: Michal Hocko
> Cc: Mike Rapoport
> Cc: David Hildenbrand
> Cc: Vasily Gorbik
> Cc: Oscar
rovide an unaligned address
and even if it did then rounding that to a pfn doesn't sound like a
terrible thing to do. Anyway this removes few lines so why not.
>
> Cc: Andrew Morton
> Cc: Oscar Salvador
> Cc: Michal Hocko
> Cc: David Hildenbrand
> Cc: Pavel Tatashin
> Cc: Q
On Thu 02-05-19 09:00:31, Michal Hocko wrote:
> On Wed 01-05-19 15:12:32, Barret Rhoden wrote:
> [...]
> > A more elegant solution may be to avoid registering with sysfs during early
> > boot, or something else entirely. But I figured I'd ask for help at this
> > p
#endif
>
> -#ifdef CONFIG_NODES_SPAN_OTHER_NODES
> +#ifdef CONFIG_NUMA
> /* Only safe to use early in boot when initialisation is single-threaded */
> static inline bool __meminit early_pfn_in_nid(unsigned long pfn, int node)
> {
> --
> 2.7.4
>
--
Michal Hocko
SUSE Labs
lly helpful.
I will think about this some more but I am traveling this week. It seems
really awkward to register a sysfs file for an empty range. That looks
like a bug to me.
--
Michal Hocko
SUSE Labs
On Tue 23-04-19 05:41:48, Matthew Wilcox wrote:
> On Tue, Apr 23, 2019 at 12:47:07PM +0200, Michal Hocko wrote:
> > On Mon 22-04-19 14:29:16, Michel Lespinasse wrote:
> > [...]
> > > I want to add a note about mmap_sem. In the past there has been
> > > discu
ng said I am not opposed to
this change I just think it is a large hammer while we haven't seen
attempts to tackle problems in a simpler way.
--
Michal Hocko
SUSE Labs
Forgot to cc Andrew. Now for real.
Andrew please note that Dave has reviewed the patch
http://lkml.kernel.org/r/77b364e5-a30c-964a-6985-00b759dac...@intel.com
Or do you want me to resubmit?
On Mon 15-04-19 13:42:09, Michal Hocko wrote:
> On Tue 26-02-19 14:12:01, Michal Hocko wrote:
> &g
On Tue 26-02-19 14:12:01, Michal Hocko wrote:
> On Tue 12-02-19 10:53:41, Michal Hocko wrote:
> > Hi,
> > this has been posted as an RFC previously [1]. There didn't seem to be
> > any objections so I am reposting this for inclusion. I have added a
> > debugging
ld we get separate variable
> for gfp context at this point?
Yes, that sounds like a reasonable thing to do. Just note that xfs still
uses current_{set,restore}* api to handle PF_MEMALLOC_NOFS so that would
have to be moved over to the memalloc_nofs_{save,restore} API.
--
Michal Hocko
On Tue 12-02-19 10:53:41, Michal Hocko wrote:
> Hi,
> this has been posted as an RFC previously [1]. There didn't seem to be
> any objections so I am reposting this for inclusion. I have added a
> debugging patch which prints the zonelist setup for each numa node
> for an e
On Wed 13-02-19 08:14:50, Dave Hansen wrote:
> On 2/13/19 1:43 AM, Michal Hocko wrote:
> >
> > We have seen several bugs where zonelists have not been initialized
> > properly and it is not really straightforward to track those bugs down.
> > One way to help a bit at le
On Wed 13-02-19 14:11:31, Peter Zijlstra wrote:
> On Wed, Feb 13, 2019 at 12:50:14PM +0100, Michal Hocko wrote:
> > On Wed 13-02-19 11:32:31, Peter Zijlstra wrote:
> > > On Wed, Feb 13, 2019 at 10:43:15AM +0100, Michal Hocko wrote:
> > > > @@ -5259,6 +5261,11
On Wed 13-02-19 11:32:31, Peter Zijlstra wrote:
> On Wed, Feb 13, 2019 at 10:43:15AM +0100, Michal Hocko wrote:
> > @@ -5259,6 +5261,11 @@ static void build_zonelists(pg_data_t *pgdat)
> >
> > build_zonelists_in_node_order(pgdat, node_order, nr_nodes);
> > bui
From: Michal Hocko
We have seen several bugs where zonelists have not been initialized
properly and it is not really straightforward to track those bugs down.
One way to help a bit at least is to dump zonelists of each node when
they are (re)initialized.
Signed-off-by: Michal Hocko
---
Sorry
From: Michal Hocko
We have seen several bugs where zonelists have not been initialized
properly and it is not really straightforward to track those bugs down.
One way to help a bit at least is to dump zonelists of each node when
they are (re)initialized.
Signed-off-by: Michal Hocko
---
mm
From: Michal Hocko
We have seen several bugs where zonelists have not been initialized
properly and it is not really straightforward to track those bugs down.
One way to help a bit at least is to dump zonelists of each node when
they are (re)initialized.
Signed-off-by: Michal Hocko
---
mm
From: Michal Hocko
Pingfan Liu has reported the following splat
[5.772742] BUG: unable to handle kernel paging request at 2088
[5.773618] PGD 0 P4D 0
[5.773618] Oops: [#1] SMP NOPTI
[5.773618] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.20.0-rc1+ #3
[5.773618
Hi,
this has been posted as an RFC previously [1]. There didn't seem to be
any objections so I am reposting this for inclusion. I have added a
debugging patch which prints the zonelist setup for each numa node
for an easier debugging of a broken zonelist setup.
[1] http://lkml.kernel.org/r/2019011
On Mon 11-02-19 14:49:09, Ingo Molnar wrote:
>
> * Michal Hocko wrote:
>
> > On Thu 24-01-19 11:10:50, Dave Hansen wrote:
> > > On 1/24/19 6:17 AM, Michal Hocko wrote:
> > > > and nr_cpus set to 4. The underlying reason is tha the device is bound
> > &
On Thu 24-01-19 11:10:50, Dave Hansen wrote:
> On 1/24/19 6:17 AM, Michal Hocko wrote:
> > and nr_cpus set to 4. The underlying reason is tha the device is bound
> > to node 2 which doesn't have any memory and init_cpu_to_node only
> > initializes memory-less nodes for p
On Thu 24-01-19 19:51:44, Mike Rapoport wrote:
> On Thu, Jan 24, 2019 at 03:17:27PM +0100, Michal Hocko wrote:
> > a friendly ping for this. Does anybody see any problem with this
> > approach?
>
> FWIW, it looks fine to me.
>
> It'd just be nice to have a few m
a friendly ping for this. Does anybody see any problem with this
approach?
On Mon 14-01-19 09:24:16, Michal Hocko wrote:
> From: Michal Hocko
>
> Pingfan Liu has reported the following splat
> [5.772742] BUG: unable to handle kernel paging request at 2088
> [
On Wed 16-01-19 18:57:13, Anshuman Khandual wrote:
>
>
> On 01/16/2019 06:14 PM, Michal Hocko wrote:
> > On Wed 16-01-19 04:30:18, Matthew Wilcox wrote:
> >> On Wed, Jan 16, 2019 at 07:57:03AM +0100, Michal Hocko wrote:
> >>> On Wed 16-01-19 11:51:32,
On Wed 16-01-19 05:18:27, Matthew Wilcox wrote:
> On Wed, Jan 16, 2019 at 06:42:22PM +0530, Anshuman Khandual wrote:
> > On 01/16/2019 06:00 PM, Matthew Wilcox wrote:
> > > On Wed, Jan 16, 2019 at 07:57:03AM +0100, Michal Hocko wrote:
> > >> On Wed 16-01-19 11:
On Wed 16-01-19 04:30:18, Matthew Wilcox wrote:
> On Wed, Jan 16, 2019 at 07:57:03AM +0100, Michal Hocko wrote:
> > On Wed 16-01-19 11:51:32, Anshuman Khandual wrote:
> > > All architectures have been defining their own PGALLOC_GFP as (GFP_KERNEL
> > > |
> &g
t *pgd)
> @@ -422,7 +420,8 @@ static inline void _pgd_free(pgd_t *pgd)
>
> static inline pgd_t *_pgd_alloc(void)
> {
> - return (pgd_t *)__get_free_pages(PGALLOC_GFP, PGD_ALLOCATION_ORDER);
> + return (pgd_t *)__get_free_pages(GFP_PGTABLE | __GFP_ACCOUNT,
> + PGD_ALLOCATION_ORDER);
> }
>
> static inline void _pgd_free(pgd_t *pgd)
> diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
> index 05e61e6..3d9cde6 100644
> --- a/include/asm-generic/pgtable.h
> +++ b/include/asm-generic/pgtable.h
> @@ -1186,4 +1186,6 @@ static inline bool arch_has_pfn_modify_check(void)
> #define mm_pmd_folded(mm)__is_defined(__PAGETABLE_PMD_FOLDED)
> #endif
>
> +#define GFP_PGTABLE (GFP_KERNEL | __GFP_ZERO)
> +
> #endif /* _ASM_GENERIC_PGTABLE_H */
> diff --git a/virt/kvm/arm/mmu.c b/virt/kvm/arm/mmu.c
> index fbdf3ac..f60a5b8 100644
> --- a/virt/kvm/arm/mmu.c
> +++ b/virt/kvm/arm/mmu.c
> @@ -143,7 +143,7 @@ static int mmu_topup_memory_cache(struct
> kvm_mmu_memory_cache *cache,
> if (cache->nobjs >= min)
> return 0;
> while (cache->nobjs < max) {
> - page = (void *)__get_free_page(PGALLOC_GFP);
> + page = (void *)__get_free_page(GFP_PGTABLE);
> if (!page)
> return -ENOMEM;
> cache->objects[cache->nobjs++] = page;
> --
> 2.7.4
>
--
Michal Hocko
SUSE Labs
On Mon 14-01-19 21:26:39, Michael Ellerman wrote:
> Michal Hocko writes:
>
> > From: Michal Hocko
> >
> > Pingfan Liu has reported the following splat
> > [5.772742] BUG: unable to handle kernel paging request at
> > 2088
> > [5.7
From: Michal Hocko
Pingfan Liu has reported the following splat
[5.772742] BUG: unable to handle kernel paging request at 2088
[5.773618] PGD 0 P4D 0
[5.773618] Oops: [#1] SMP NOPTI
[5.773618] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.20.0-rc1+ #3
[5.773618
On Mon 14-01-19 09:30:55, Anshuman Khandual wrote:
>
>
> On 01/13/2019 11:05 PM, Michal Hocko wrote:
> > On Sat 12-01-19 15:56:38, Anshuman Khandual wrote:
> >> All architectures have been defining their own PGALLOC_GFP as (GFP_KERNEL |
> >> __GFP_ZERO) and u
expose in generic gfp.h IMHO. It just risks an abuse. I would be looking
at providing asm-generic implementation and reuse it to remove the code
duplication. But I haven't tried that to know that it will work out due
to small/subtle differences between arches.
> Signed-off-by: Anshuman Khand
w, I am doing it just like
> > the other types (e.g. online_type) we are using in that context.
> > - The "removable" property should never have been named like that. It
> > should have been "offlinable". Can we still rename that? E.g. boot memory
> > is sometimes marked as removable ...
> >
>
>
> Any feedback regarding the suggested block types would be very much
> appreciated!
I still do not like this much to be honest. I just didn't get to think
through this properly. My fear is that this is conflating an actual API
with the current implementation and as such will cause problems in
future. But I haven't really looked into your patches closely so I might
be wrong. Anyway I won't be able to look into it by the end of year.
--
Michal Hocko
SUSE Labs
On Thu 20-12-18 20:26:28, Pingfan Liu wrote:
> On Thu, Dec 20, 2018 at 7:35 PM Michal Hocko wrote:
> >
> > On Thu 20-12-18 17:50:38, Pingfan Liu wrote:
> > [...]
> > > @@ -453,7 +456,12 @@ static inline int gfp_zonelist(gfp_t flags)
> > > */
> > &g
gfp_zonelist(flags);
> }
No, please don't do this. We do not want to make things work magically
and we definitely do not want to put something like that into the hot
path. We definitely need zonelists to be build transparently for all
possible nodes during the init time.
--
Michal Hocko
SUSE Labs
upport for migrating compound pages. The first path adds
> > the helper
> > get_user_pages_cma_migrate() which pin the page making sure we migrate them
> > out of
> > CMA region before incrementing the reference count.
>
> Very little review activity. Perhaps Andrey and/or Michal can find the
> time..
I will unlikely find some time before the end of the year. Sorry about
that.
--
Michal Hocko
SUSE Labs
sor. And that is independent from
> PG_reserved.
>
> Cc: Andrew Morton
> Cc: Stephen Rothwell
> Cc: Pavel Tatashin
> Cc: Michal Hocko
> Cc: Alexander Duyck
> Cc: Matthew Wilcox
> Cc: Anthony Yznaga
> Cc: Miles Chen
> Cc: yi.z.zh...@linux.intel.com
> Cc: Dan
served users before we can do so for device memory?
I am all for removing relicts because they just confuse people but I
fail to see any relation here.
--
Michal Hocko
SUSE Labs
s hard to review manually.
--
Michal Hocko
SUSE Labs
ic(size, 0)
> + memblock_alloc_low_nopanic(size, SMP_CACHE_BYTES)
> |
> - memblock_alloc_from_nopanic(size, 0, min_addr)
> + memblock_alloc_from_nopanic(size, SMP_CACHE_BYTES, min_addr)
> |
> - memblock_alloc_node(size, 0, nid)
> + memblock_alloc_node(size, SMP_CACHE_BYTES, nid)
> )
>
g to enable
them anyway (e.g. RAS would require to have movable_node kernel
parameters, ballooning a kernel module etc.).
Really, one udev script to rule them all will simply never work.
--
Michal Hocko
SUSE Labs
ree that allocating that from the zone normal and off node
is not great. Especially the second part which is noticeable for whole
node hotplug.
I have a feeling that arguing about fork not able to proceed or OOMing
for the memory hotplug is a bit of a stretch and a sign a of
misconfiguration.
--
Michal Hocko
SUSE Labs
d of days here trying to come up with
> an onlining solution which would work for everyone and eBPF would move
> this decision to distro level.
The point is that there is _no_ general onlining solution. This is
basically policy which belongs to the userspace.
--
Michal Hocko
SUSE Labs
On Tue 02-10-18 17:25:19, David Hildenbrand wrote:
> On 02/10/2018 15:47, Michal Hocko wrote:
[...]
> > Zone imbalance is an inherent problem of the highmem zone. It is
> > essentially the highmem zone we all loved so much back in 32b days.
> > Yes the movable zone doesn&
On Wed 03-10-18 15:38:04, Vitaly Kuznetsov wrote:
> David Hildenbrand writes:
>
> > On 02/10/2018 15:47, Michal Hocko wrote:
> ...
> >>
> >> Why do you need a generic hotplug rule in the first place? Why don't you
> >> simply provide different
On Tue 02-10-18 12:45:50, Tyrel Datwyler wrote:
> On 10/02/2018 11:13 AM, Michael Bringmann wrote:
> >
> >
> > On 10/02/2018 11:04 AM, Michal Hocko wrote:
> >> On Tue 02-10-18 10:14:49, Michael Bringmann wrote:
> >>> On 10/02/2018 09:59 AM, Michal Ho
On Tue 02-10-18 10:14:49, Michael Bringmann wrote:
> On 10/02/2018 09:59 AM, Michal Hocko wrote:
> > On Tue 02-10-18 09:51:40, Michael Bringmann wrote:
> > [...]
> >> When the device-tree affinity attributes have changed for memory,
> >> the 'nid' affinit
tion of LMBs, but it is not there
> yet, and won't be present in earlier kernels without backporting a
> significant number of changes.
Then the patch you have proposed here just papers over a real issue, no?
IIUC then you simply do not remove the memory if you lose the race.
--
Michal Hocko
SUSE Labs
On Mon 01-10-18 11:34:25, David Hildenbrand wrote:
> On 01/10/2018 10:40, Michal Hocko wrote:
> > On Fri 28-09-18 17:03:57, David Hildenbrand wrote:
> > [...]
> >
> > I haven't read the patch itself but I just wanted to note one thing
> > about this part
&g
ove_memory simply backs off
silently. Why don't we have to care about memblock resp
dlpar_remove_device_tree_lmb parts? In other words how come the physical
memory range is valid while the node association is not?
--
Michal Hocko
SUSE Labs
purpose. You said that distributions have hard time to
distinguish different types of onlinining policies but isn't this
something that is inherently usecase specific?
--
Michal Hocko
SUSE Labs
On Wed 26-09-18 16:43:35, Mike Rapoport wrote:
> On Wed, Sep 26, 2018 at 11:36:48AM +0200, Michal Hocko wrote:
> > On Wed 26-09-18 11:31:27, Michal Hocko wrote:
> > > On Fri 14-09-18 15:10:29, Mike Rapoport wrote:
> > > > With the align parameter memblock_alloc
cks from the previous
iteration and there are only minor comments. This looks good overall.
Nice work Mike!
--
Michal Hocko
SUSE Labs
l of duplicated '#include
>
> @@
> @@
> - #include
> + #include
>
> Signed-off-by: Mike Rapoport
Acked-by: Michal Hocko
--
Michal Hocko
SUSE Labs
f (new == NULL) {
> pr_err("Alloc_bootmem failed\n");
> return 1;
> diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
> index e8ae2e5..332fcca 100644
> --- a/drivers/macintosh/smu.c
> +++ b/drivers/macintosh/smu.c
> @@ -493,7 +493,7 @@ int __init smu_init (void)
> goto fail_np;
> }
>
> - smu = alloc_bootmem(sizeof(struct smu_device));
> + smu = memblock_alloc(sizeof(struct smu_device), 0);
>
> spin_lock_init(&smu->lock);
> INIT_LIST_HEAD(&smu->cmd_list);
> diff --git a/init/main.c b/init/main.c
> index d0b92bd..99a9e99 100644
> --- a/init/main.c
> +++ b/init/main.c
> @@ -768,8 +768,8 @@ static int __init initcall_blacklist(char *str)
> str_entry = strsep(&str, ",");
> if (str_entry) {
> pr_debug("blacklisting initcall %s\n", str_entry);
> - entry = alloc_bootmem(sizeof(*entry));
> - entry->buf = alloc_bootmem(strlen(str_entry) + 1);
> + entry = memblock_alloc(sizeof(*entry), 0);
> + entry->buf = memblock_alloc(strlen(str_entry) + 1, 0);
> strcpy(entry->buf, str_entry);
> list_add(&entry->next, &blacklisted_initcalls);
> }
> --
> 2.7.4
>
--
Michal Hocko
SUSE Labs
On Fri 14-09-18 15:10:31, Mike Rapoport wrote:
> Use memblock_alloc_try_nid whenever goal (i.e. minimal address is
> specified) and memblock_alloc_node otherwise.
>
> Signed-off-by: Mike Rapoport
Acked-by: Michal Hocko
--
Michal Hocko
SUSE Labs
On Wed 26-09-18 11:31:27, Michal Hocko wrote:
> On Fri 14-09-18 15:10:29, Mike Rapoport wrote:
> > With the align parameter memblock_alloc_node() can be used as drop in
> > replacement for alloc_bootmem_pages_node() and __alloc_bootmem_node(),
> > which is done in the follow
if (slab_is_available())
> section = kzalloc_node(array_size, GFP_KERNEL, nid);
> else
> - section = memblock_alloc_node(array_size, nid);
> + section = memblock_alloc_node(array_size, 0, nid);
>
> return section;
> }
> --
> 2.7.4
>
--
Michal Hocko
SUSE Labs
by this change. It is
unnecessary churn. So if nothing else just add a note _why_ you think
this is better.
--
Michal Hocko
SUSE Labs
On Fri 14-09-18 15:10:20, Mike Rapoport wrote:
> Several bootmem functions and macros are not used. Remove them.
>
> Signed-off-by: Mike Rapoport
Acked-by: Michal Hocko
--
Michal Hocko
SUSE Labs
Acked-by: Michal Hocko
--
Michal Hocko
SUSE Labs
g that I've seen a patch to address
that. It would be great to have it folded to this one.
> Signed-off-by: Mike Rapoport
Acked-by: Michal Hocko
--
Michal Hocko
SUSE Labs
On Fri 07-09-18 16:45:09, Aneesh Kumar K.V wrote:
> On 09/07/2018 02:33 PM, Michal Hocko wrote:
> > On Thu 06-09-18 19:00:43, Aneesh Kumar K.V wrote:
> > > On 09/06/2018 06:23 PM, Michal Hocko wrote:
> > > > On Thu 06-09-18 11:13:42, Aneesh Kumar K.V wrote:
> >
On Thu 06-09-18 19:00:43, Aneesh Kumar K.V wrote:
> On 09/06/2018 06:23 PM, Michal Hocko wrote:
> > On Thu 06-09-18 11:13:42, Aneesh Kumar K.V wrote:
> > > Current code doesn't do page migration if the page allocated is a
> > > compound page.
> > > With
On Fri 07-09-18 11:42:12, Mike Rapoport wrote:
> On Thu, Sep 06, 2018 at 03:46:27PM +0200, Michal Hocko wrote:
> > On Thu 06-09-18 16:39:58, Mike Rapoport wrote:
> > > On Thu, Sep 06, 2018 at 03:01:02PM +0200, Michal Hocko wrote:
> > > > On Thu 06-09-18 15:43:21, Mik
On Thu 06-09-18 16:39:58, Mike Rapoport wrote:
> On Thu, Sep 06, 2018 at 03:01:02PM +0200, Michal Hocko wrote:
> > On Thu 06-09-18 15:43:21, Mike Rapoport wrote:
> > > On Thu, Sep 06, 2018 at 09:28:00AM +0200, Michal Hocko wrote:
> > > > On Wed 05-09-18 20:20:18, Mik
On Thu 06-09-18 15:43:21, Mike Rapoport wrote:
> On Thu, Sep 06, 2018 at 09:28:00AM +0200, Michal Hocko wrote:
> > On Wed 05-09-18 20:20:18, Mike Rapoport wrote:
> > > On Wed, Sep 05, 2018 at 12:04:36PM -0500, Rob Herring wrote:
> > > > On Wed, Sep 5, 2018 at 11:00 AM
MA/ZONE_MOVABLE pages. Pinned pages are not reclaimable as
well so there is a risk of OOMs if there are too many of them. We have
discussed approaches that would allow to force pin invalidation/revocation
at LSF/MM. Isn't that a more appropriate solution to the problem you are
seeing?
--
Michal Hocko
SUSE Labs
tter describe why you are
bypassing hugetlb pools. I assume that the reason is to guarantee a
forward progress because those might be sitting in the CMA pools
already, right?
--
Michal Hocko
SUSE Labs
On Thu 06-09-18 14:31:11, Michal Hocko wrote:
> On Thu 06-09-18 11:13:39, Aneesh Kumar K.V wrote:
> > We want to use this to support customized huge page migration.
>
> Please be much more specific. Ideally including the user. Btw. why do
> you want to skip the hugetlb poo
use?
--
Michal Hocko
SUSE Labs
this. I wish we
could simplify the memblock API as well. There are just too many public
functions with subtly different semantic and barely any useful
documentation.
But even this is a great step forward!
--
Michal Hocko
SUSE Labs
On Wed 05-09-18 18:59:43, Mike Rapoport wrote:
> Drop BOOTMEM_ALLOC_ACCESSIBLE and BOOTMEM_ALLOC_ANYWHERE in favor of
> identical MEMBLOCK definitions.
>
> Signed-off-by: Mike Rapoport
Acked-by: Michal Hocko
> ---
> arch/ia64/mm/discontig.c | 2 +-
> arch/powerpc/
On Wed 05-09-18 18:59:42, Mike Rapoport wrote:
> Move a few remaining functions from nobootmem.c to memblock.c and remove
> nobootmem
>
> Signed-off-by: Mike Rapoport
Acked-by: Michal Hocko
> ---
> mm/Makefile| 1 -
>
On Wed 05-09-18 18:59:41, Mike Rapoport wrote:
> The conversion is done using
>
> sed -i 's@__free_pages_bootmem@memblock_free_pages@' \
> $(git grep -l __free_pages_bootmem)
>
> Signed-off-by: Mike Rapoport
Acked-by: Michal Hocko
> ---
> mm/internal
On Wed 05-09-18 18:59:40, Mike Rapoport wrote:
> The conversion is done using
>
> sed -i 's@free_all_bootmem@memblock_free_all@' \
> $(git grep -l free_all_bootmem)
>
> Signed-off-by: Mike Rapoport
Acked-by: Michal Hocko
--
Michal Hocko
SUSE Labs
bootmem variant.
>
> Signed-off-by: Mike Rapoport
Acked-by: Michal Hocko
> ---
> arch/sparc/kernel/mdesc.c | 3 ++-
> arch/x86/platform/efi/quirks.c | 6 +++---
> drivers/firmware/efi/apple-properties.c | 2 +-
> include/linux/bootmem.h
> - free_bootmem(e1, e2)
> + memblock_free(e1, e2)
> |
> - free_bootmem_node(e1, e2, e3)
> + memblock_free(e2, e3)
> )
>
> Signed-off-by: Mike Rapoport
Acked-by: Michal Hocko
> ---
> arch/alpha/kernel/core_irongate.c | 3 +--
> arch/arm64/mm/init.c | 2 +-
>
On Wed 05-09-18 18:59:37, Mike Rapoport wrote:
> The bootmem compatibility APIs are not used and can be removed.
>
> Signed-off-by: Mike Rapoport
I am happy to see this finally go
Acked-by: Michal Hocko
> ---
> include/linux/bootmem.h | 47 --
> mm/nobootme
0);
> int i;
>
> cmdline[0] = 0;
> diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
> index e8ae2e5..332fcca 100644
> --- a/drivers/macintosh/smu.c
> +++ b/drivers/macintosh/smu.c
> @@ -493,7 +493,7 @@ int __init smu_init (void)
> goto fail_np;
> }
>
> - smu = alloc_bootmem(sizeof(struct smu_device));
> + smu = memblock_alloc(sizeof(struct smu_device), 0);
>
> spin_lock_init(&smu->lock);
> INIT_LIST_HEAD(&smu->cmd_list);
> diff --git a/init/main.c b/init/main.c
> index d0b92bd..99a9e99 100644
> --- a/init/main.c
> +++ b/init/main.c
> @@ -768,8 +768,8 @@ static int __init initcall_blacklist(char *str)
> str_entry = strsep(&str, ",");
> if (str_entry) {
> pr_debug("blacklisting initcall %s\n", str_entry);
> - entry = alloc_bootmem(sizeof(*entry));
> - entry->buf = alloc_bootmem(strlen(str_entry) + 1);
> + entry = memblock_alloc(sizeof(*entry), 0);
> + entry->buf = memblock_alloc(strlen(str_entry) + 1, 0);
> strcpy(entry->buf, str_entry);
> list_add(&entry->next, &blacklisted_initcalls);
> }
> --
> 2.7.4
>
--
Michal Hocko
SUSE Labs
MP_CACHE_BYTES, 0UL);
> + ctx_list_pool = memblock_alloc_from(size, SMP_CACHE_BYTES, 0UL);
>
> for (ctx = 0; ctx < numctx; ctx++) {
> struct ctx_list *clist;
> diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h
> index 3896af2..c97c105 100644
> --- a/include/linux/bootmem.h
> +++ b/include/linux/bootmem.h
> @@ -122,6 +122,14 @@ static inline void * __init memblock_alloc_raw(
> NUMA_NO_NODE);
> }
>
> +static inline void * __init memblock_alloc_from(
> + phys_addr_t size, phys_addr_t align, phys_addr_t min_addr)
> +{
> + return memblock_alloc_try_nid(size, align, min_addr,
> + BOOTMEM_ALLOC_ACCESSIBLE,
> + NUMA_NO_NODE);
> +}
> +
> static inline void * __init memblock_alloc_nopanic(
> phys_addr_t size, phys_addr_t align)
> {
> --
> 2.7.4
>
--
Michal Hocko
SUSE Labs
On Wed 05-09-18 18:59:34, Mike Rapoport wrote:
> The conversion is done using the following semantic patch:
>
> @@
> expression e;
> @@
> - alloc_bootmem_pages(e)
> + memblock_alloc(e, PAGE_SIZE)
>
> Signed-off-by: Mike Rapoport
Same as the previous pa
do the right thing and from a quick glance
it looks sane (modulo _virt naming)
Acked-by: Michal Hocko
> ---
> arch/arc/mm/highmem.c| 2 +-
> arch/m68k/atari/stram.c | 3 ++-
> arch/m68k/mm/motorola.c | 5 +++--
> arch/mips/cavium-o
On Wed 05-09-18 18:59:32, Mike Rapoport wrote:
> Signed-off-by: Mike Rapoport
ENOCHAGELOG again
The conversion itself looks good to me
Acked-by: Michal Hocko
> ---
> arch/alpha/kernel/pci_iommu.c | 4 ++--
> arch/ia64/sn/kernel/io_common.c | 7 ++-
> arch/ia64/sn/kernel/
On Wed 05-09-18 18:59:31, Mike Rapoport wrote:
> Use memblock_alloc_try_nid whenever goal (i.e. mininal address is
> specified) and memblock_alloc_node otherwise.
I suspect you wanted to say (i.e. minimal address) is specified
> Signed-off-by: Mike Rapoport
Acked-by: Michal Hocko
On Thu 06-09-18 09:30:23, Michal Hocko wrote:
> Is there any reason to keep
>
> ifdef CONFIG_NO_BOOTMEM
> obj-y += nobootmem.o
> else
> obj-y += bootmem.o
> endif
>
> behind?
I can see you have done so in an earlier patch. I have mi
On Wed 05-09-18 18:59:30, Mike Rapoport wrote:
> Signed-off-by: Mike Rapoport
again a short work of wisdom please.
The change itself looks good.
Acked-by: Michal Hocko
> ---
> arch/ia64/mm/init.c | 8
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --
vailable())
> section = kzalloc_node(array_size, GFP_KERNEL, nid);
> else
> - section = memblock_alloc_node(array_size, nid);
> + section = memblock_alloc_node(array_size, 0, nid);
>
> return section;
> }
> --
> 2.7.4
>
--
Michal Hocko
SUSE Labs
On Wed 05-09-18 18:59:28, Mike Rapoport wrote:
> Signed-off-by: Mike Rapoport
The translation is simpler here but still a word or two would be nice.
Empty changelogs suck.
To the change
Acked-by: Michal Hocko
> ---
> arch/arc/kernel/unwind.c | 4 ++--
> arch/x86/kernel/se
On Wed 05-09-18 18:59:27, Mike Rapoport wrote:
> The alloc_bootmem_low(size) allocates low memory with default alignement
> and can be replcaed by memblock_alloc_low(size, 0)
>
> Signed-off-by: Mike Rapoport
Again _virt renaming thing...
Acked-by: Michal Hocko
> ---
>
deep down the
callpath to see they are doing the same thing essentially.
> Signed-off-by: Mike Rapoport
Acked-by: Michal Hocko
> ---
> drivers/usb/early/xhci-dbc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/early/xhci-dbc.c b/d
ode if the given one doesn't have a
proper range. So good. Lack of proper documentation didn't really help.
> Signed-off-by: Mike Rapoport
Acked-by: Michal Hocko
> ---
> arch/x86/kernel/setup_percpu.c | 6 --
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
On Wed 05-09-18 18:59:24, Mike Rapoport wrote:
> The functions are equivalent, just the later does not require nobootmem
> translation layer.
>
> Signed-off-by: Mike Rapoport
modulo @memblock_alloc_low@@memblock_virt_alloc_low@
Acked-by: Michal Hocko
> ---
> arch/x86/k
On Wed 05-09-18 18:59:23, Mike Rapoport wrote:
> The functions are equivalent, just the later does not require nobootmem
> translation layer.
>
> Signed-off-by: Mike Rapoport
Acked-by: Michal Hocko
> ---
> arch/x86/xen/p2m.c | 2 +-
> 1 file changed, 1 insertion(+), 1
uble checked the resulting patch
but the change makes sense to me
Acked-by: Michal Hocko
> ---
> arch/arm/mm/mmu.c | 2 +-
> arch/arm64/mm/mmu.c | 2 +-
> arch/arm64/mm/numa.c | 2 +-
> arch/c6x/mm/dma-coherent.c
obj-y += bootmem.o
endif
behind?
> Signed-off-by: Mike Rapoport
Acked-by: Michal Hocko
> ---
> include/linux/bootmem.h | 16 -
> mm/bootmem.c| 811
>
> 2 files changed, 827 deletions(-)
> delete mode 100
> memblock_virt_alloc_node_nopanic, memblock_virt_alloc_low_nopanic.
>
> And for consistency I've changed the memblock_virt_alloc as well.
I would keep the current API unless the name is terribly misleading or
it can be improved a lot. Neither seems to be the case here. So I would
rather stick with the status quo.
--
Michal Hocko
SUSE Labs
on-migratable huge page sizes. Something like:
>
> if (PageHuge(page) &&
> hugepage_migration_supported(page_hstate(page))) {
Ohh, definitely, this is much better.
--
Michal Hocko
SUSE Labs
201 - 300 of 484 matches
Mail list logo