Hello,
On Mon, Jan 22, 2024 at 08:55:39PM -0500, Steven Rostedt wrote:
> On Tue, 23 Jan 2024 09:44:43 +0800
> George Guo wrote:
>
> > There are two reasons of percpu_alloc failed without warnings:
> >
> > 1. do_warn is false
> > 2. do_warn is true and warn_limit is reached the limit.
>
> Yes
On Tue, Apr 20, 2021 at 04:37:02PM +0530, Pratik Sampat wrote:
>
> On 20/04/21 4:27 am, Dennis Zhou wrote:
> > On Mon, Apr 19, 2021 at 10:50:43PM +0000, Dennis Zhou wrote:
> > > Hello,
> > >
> > > This series is a continuation of Roman's series in [1]
On Mon, Apr 19, 2021 at 10:50:43PM +, Dennis Zhou wrote:
> Hello,
>
> This series is a continuation of Roman's series in [1]. It aims to solve
> chunks holding onto free pages by adding a reclaim process to the percpu
> balance work item.
>
> The m
On Mon, Apr 19, 2021 at 10:50:43PM +, Dennis Zhou wrote:
> Hello,
>
> This series is a continuation of Roman's series in [1]. It aims to solve
> chunks holding onto free pages by adding a reclaim process to the percpu
> balance work item.
>
And I forgot t
uffice a new allocation, sidelined chunks are first
checked before creating a new chunk.
Signed-off-by: Roman Gushchin
Co-developed-by: Dennis Zhou
Signed-off-by: Dennis Zhou
---
mm/percpu-internal.h | 4 +
mm/percpu-km.c | 5 ++
mm/percpu-stats.c| 12 +--
mm/percpu-vm.c
irectly went to the
to_depopulate_slot. pcpu_nr_isolated_empty_pop_pages[] is introduced to
aid with this.
Suggested-by: Roman Gushchin
Signed-off-by: Dennis Zhou
---
mm/percpu-internal.h | 1 +
mm/percpu-stats.c| 8 ++--
mm/percpu.c | 44 +---
This prepares for adding a to_depopulate list and sidelined list after
the free slot in the set of lists in pcpu_slot.
Signed-off-by: Dennis Zhou
---
mm/percpu.c | 14 --
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/mm/percpu.c b/mm/percpu.c
index 5edc7bd88133
From: Roman Gushchin
Factor out the pcpu_check_block_hint() helper, which will be useful
in the future. The new function checks if the allocation can likely
fit within the contig hint.
Signed-off-by: Roman Gushchin
Signed-off-by: Dennis Zhou
---
mm/percpu.c | 30
-5.14 67c2669d69fb.
diffstats below:
Dennis Zhou (2):
percpu: use pcpu_free_slot instead of pcpu_nr_slots - 1
percpu: use reclaim threshold instead of running for every page
Roman Gushchin (2):
percpu: factor out pcpu_check_block_hint()
percpu: implement partial chunk depopulation
mm/p
; > >
> > > > > > > I apologize for the clutter of logs before, I'm pasting the logs
> > > > > > > of before and
> > > > > > > after the percpu test in the case of the patchset being applied
> > > > > > >
Hello,
On Wed, Apr 07, 2021 at 08:57:35PM -0700, Roman Gushchin wrote:
> Factor out the pcpu_check_chunk_hint() helper, which will be useful
> in the future. The new function checks if the allocation can likely
> fit the given chunk.
>
> Signed-off-by: Roman Gushchin
> ---
> mm/percpu.c | 30 ++
Hello,
On Wed, Apr 07, 2021 at 08:57:34PM -0700, Roman Gushchin wrote:
> To prepare for the depopulation of percpu chunks, split out the
> populating part of the pcpu_balance_populated() into the new
> pcpu_grow_populated() (with an intention to add
> pcpu_shrink_populated() in the next commit).
>
Hello,
On Wed, Apr 07, 2021 at 08:57:33PM -0700, Roman Gushchin wrote:
> nr_empty_pop_pages is used to guarantee that there are some free
> populated pages to satisfy atomic allocations. Accounted and
> non-accounted allocations are using separate sets of chunks,
> so both need to have a surplus o
ep the current synchronization in place.
>
> Signed-off-by: Roman Gushchin
> Reviewed-by: Dennis Zhou
> ---
> mm/percpu.c | 46 +-
> 1 file changed, 29 insertions(+), 17 deletions(-)
>
> diff --git a/mm/percpu.c b/mm/percpu.
Hello,
On Wed, Apr 07, 2021 at 08:57:31PM -0700, Roman Gushchin wrote:
> Since the commit 3e54097beb22 ("percpu: manage chunks based on
> contig_bits instead of free_bytes") chunks are sorted based on the
> size of the biggest continuous free area instead of the total number
> of free bytes. Updat
Hello,
On Fri, Apr 16, 2021 at 06:26:15PM +0530, Pratik Sampat wrote:
> Hello Roman,
>
> I've tried the v3 patch series on a POWER9 and an x86 KVM setup.
>
> My results of the percpu_test are as follows:
> Intel KVM 4CPU:4G
> Vanilla 5.12-rc6
> # ./percpu_test.sh
> Percpu: 1952 kB
>
On Thu, Apr 15, 2021 at 01:24:31PM +0800, Huang, Ying wrote:
> Dennis Zhou writes:
>
> > On Wed, Apr 14, 2021 at 01:44:58PM +0800, Huang, Ying wrote:
> >> Dennis Zhou writes:
> >>
> >> > On Wed, Apr 14, 2021 at 11:59:03AM +0800, Huan
On Thu, Apr 15, 2021 at 11:16:42AM +0800, Miaohe Lin wrote:
> On 2021/4/14 22:53, Dennis Zhou wrote:
> > On Wed, Apr 14, 2021 at 01:44:58PM +0800, Huang, Ying wrote:
> >> Dennis Zhou writes:
> >>
> >>> On Wed, Apr 14, 2021 at 11:59:03AM +0800, Huang,
On Wed, Apr 14, 2021 at 01:44:58PM +0800, Huang, Ying wrote:
> Dennis Zhou writes:
>
> > On Wed, Apr 14, 2021 at 11:59:03AM +0800, Huang, Ying wrote:
> >> Dennis Zhou writes:
> >>
> >> > Hello,
> >> >
> >> > On Wed, Apr 1
On Wed, Apr 14, 2021 at 11:59:03AM +0800, Huang, Ying wrote:
> Dennis Zhou writes:
>
> > Hello,
> >
> > On Wed, Apr 14, 2021 at 10:06:48AM +0800, Huang, Ying wrote:
> >> Miaohe Lin writes:
> >>
> >> > On 2021/4/14 9:17, Huang, Ying wrote:
&
Hello,
On Wed, Apr 14, 2021 at 10:06:48AM +0800, Huang, Ying wrote:
> Miaohe Lin writes:
>
> > On 2021/4/14 9:17, Huang, Ying wrote:
> >> Miaohe Lin writes:
> >>
> >>> On 2021/4/12 15:24, Huang, Ying wrote:
> "Huang, Ying" writes:
>
> > Miaohe Lin writes:
> >
> >> We wi
Hi Linus,
This pull request contains a fix for sporadically failing atomic percpu
allocations. I only caught it recently while I was reviewing a new
series [1] and simultaneously saw reports by btrfs in xfstests [2] and
[3].
In v5.9, memcg accounting was extended to percpu done by adding a second
slot.
>
> On the allocation path, if there are no suitable chunks found,
> the list of sidelined chunks in scanned prior to creating a new chunk.
> If there is a good sidelined chunk, it's placed back to the slot
> and the scanning is restarted.
>
> Many thanks to Dennis
when pcpu_lock is
> releases), and then tries to depopulate each chunk. Successfully
> or not, at the end all chunks are returned to appropriate slots
> and their isolated flags are cleared.
>
> Many thanks to Dennis Zhou for his great ideas and a very constructive
>
On Mon, Mar 29, 2021 at 01:10:10PM -0700, Roman Gushchin wrote:
> On Mon, Mar 29, 2021 at 07:21:24PM +0000, Dennis Zhou wrote:
> > On Wed, Mar 24, 2021 at 12:06:25PM -0700, Roman Gushchin wrote:
> > > To return unused memory to the system schedule an async
> > > de
On Mon, Mar 29, 2021 at 11:29:22AM -0700, Roman Gushchin wrote:
> On Mon, Mar 29, 2021 at 05:20:55PM +0000, Dennis Zhou wrote:
> > On Wed, Mar 24, 2021 at 12:06:23PM -0700, Roman Gushchin wrote:
> > > This patch implements partial depopulation of percpu chunks.
> > >
&
On Wed, Mar 24, 2021 at 12:06:25PM -0700, Roman Gushchin wrote:
> To return unused memory to the system schedule an async
> depopulation of percpu chunks.
>
> To balance between scanning too much and creating an overhead because
> of the pcpu_lock contention and scanning not enough, let's track an
)
> {
> enum pcpu_chunk_type type;
>
> - for (type = 0; type < PCPU_NR_CHUNK_TYPES; type++)
> - __pcpu_balance_workfn(type);
> + for (type = 0; type < PCPU_NR_CHUNK_TYPES; type++) {
> + mutex_lock(&pcpu_alloc_mutex);
> +
On Wed, Mar 24, 2021 at 12:06:23PM -0700, Roman Gushchin wrote:
> This patch implements partial depopulation of percpu chunks.
>
> As now, a chunk can be depopulated only as a part of the final
> destruction, when there are no more outstanding allocations. However
> to minimize a memory waste, it
aa52f:
percpu: fix clang modpost section mismatch (2021-02-14 18:15:15 +)
Dennis Zhou (1):
percpu: fix clang modpost section mismatch
Wonhyuk Yang (1):
percpu: reduce the number of cpu distance comparisons
include/
xjzfpqx0eu...@mail.gmail.com/
Reported-by: kernel test robot
Cc: Arnd Bergmann
Cc: Nick Desaulniers
Signed-off-by: Dennis Zhou
---
include/linux/compiler_attributes.h | 6 ++
mm/percpu.c | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/inc
Hi Nick,
On Mon, Jan 25, 2021 at 10:27:11AM -0800, Nick Desaulniers wrote:
> On Mon, Jan 25, 2021 at 3:07 AM Arnd Bergmann wrote:
> >
> > On Tue, Jan 5, 2021 at 1:55 AM Dennis Zhou wrote:
> > >
> > > On Mon, Jan 04, 2021 at 04:46:51PM -0700, Nathan Chancellor wr
On Mon, Jan 25, 2021 at 12:07:24PM +0100, Arnd Bergmann wrote:
> On Tue, Jan 5, 2021 at 1:55 AM Dennis Zhou wrote:
> >
> > On Mon, Jan 04, 2021 at 04:46:51PM -0700, Nathan Chancellor wrote:
> > > On Thu, Dec 31, 2020 at 09:28:52PM +, Dennis Zhou wrote:
&
On Mon, Jan 04, 2021 at 04:46:51PM -0700, Nathan Chancellor wrote:
> On Thu, Dec 31, 2020 at 09:28:52PM +0000, Dennis Zhou wrote:
> > This is an unusual situation so I thought it best to explain it in a
> > separate patch.
> >
> > "percpu: reduce the number of cpu
rk: cpumask_clear_cpu not inlined into
pcpu_build_alloc_info because too costly to inline (cost=725, threshold=325)
[-Rpass-missed=inline]
[1] https://lore.kernel.org/linux-mm/202012220454.9f6bkz9q-...@intel.com/
Reported-by: kernel test robot
Signed-off-by: Dennis Zhou
---
This is on top of percp
use struct_size() (2020-10-30
23:02:28 +)
Arnd Bergmann (1):
asm-generic: percpu: avoid Wshadow warning
Dennis Zhou (1):
percpu: convert flexible array initializers to use struct_size()
include/asm-generic/percpu.h
Use the safer macro as sparked by the long discussion in [1].
[1] https://lore.kernel.org/lkml/20200917204514.ga2880...@google.com/
Signed-off-by: Dennis Zhou
---
I'll apply it to for-5.10-fixes.
mm/percpu.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git
Hello,
On Mon, Oct 26, 2020 at 04:53:48PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann
>
> Nesting macros that use the same local variable names causes
> warnings when building with "make W=2":
>
> include/asm-generic/percpu.h:117:14: warning: declaration of '__ret' shadows
> a previous l
Hi Linus,
This is a fix for the first chunk size calculation where the variable
length array incorrectly used # of longs instead of bytes of longs. This
came in as a code fix and not a bug report, so I don't think it was
widely problematic. I believe it worked out due to it being memblock
memory a
On Thu, Jul 23, 2020 at 01:08:42AM +0200, Thomas Gleixner wrote:
> Dennis Zhou writes:
> > On Mon, Jul 20, 2020 at 01:49:14PM -0700, Nick Desaulniers wrote:
> >> Resend of Brian's v2 with Acks from Peter and Linus collected, as well
> >> as the final patch (mine
On Mon, Jul 20, 2020 at 01:49:14PM -0700, Nick Desaulniers wrote:
> Resend of Brian's v2 with Acks from Peter and Linus collected, as well
> as the final patch (mine) added. The commit of the final patch discusses
> some of the architectural differences between GCC and Clang, and the
> kernels tick
On Mon, Jul 06, 2020 at 09:24:43PM +0800, Feng Tang wrote:
> Hi All,
>
> Please help to review this fix patch, thanks!
>
> It is against today's linux-mm tree. For easy review, I put the fix
> into one patch, and I could split it to 2 parts for percpu-counter
> and mm/util.c if it's preferred.
>
On Thu, May 28, 2020 at 04:25:08PM -0700, Roman Gushchin wrote:
> Add a simple test to check the percpu memory accounting.
> The test creates a cgroup tree with 1000 child cgroups
> and checks values of memory.current and memory.stat::percpu.
>
> Signed-off-by: Roman Gushchin
> ---
> tools/testi
*memcg;
> long error = -ENOMEM;
>
> + memalloc_use_memcg(parent);
> memcg = mem_cgroup_alloc();
> + memalloc_unuse_memcg();
> if (IS_ERR(memcg))
> return ERR_CAST(memcg);
>
> --
> 2.25.4
>
Acked-by: Dennis Zhou
Thanks,
Dennis
obj_cgroup_uncharge(objcg, size * num_possible_cpus());
> obj_cgroup_put(objcg);
> @@ -1626,6 +1631,11 @@ static void pcpu_memcg_free_hook(struct pcpu_chunk
> *chunk, int off, size_t size)
>
> obj_cgroup_uncharge(objcg, size * num_possible_cpus());
>
> + rcu_read_lock();
> + mod_memcg_state(obj_cgroup_memcg(objcg), MEMCG_PERCPU_B,
> + -(size * num_possible_cpus()));
> + rcu_read_unlock();
> +
> obj_cgroup_put(objcg);
> }
>
> --
> 2.25.4
>
Acked-by: Dennis Zhou
Thanks,
Dennis
*ptr)
> chunk = pcpu_chunk_addr_search(addr);
> off = addr - chunk->base_addr;
>
> - pcpu_free_area(chunk, off);
> + size = pcpu_free_area(chunk, off);
> +
> + pcpu_slot = pcpu_chunk_list(pcpu_chunk_type(chunk));
> +
> + pcpu_memcg_free_hook(chunk, off, size);
>
> /* if there are more than one fully free chunks, wake up grim reaper */
> if (chunk->free_bytes == pcpu_unit_size) {
> @@ -2267,6 +2403,7 @@ void __init pcpu_setup_first_chunk(const struct
> pcpu_alloc_info *ai,
> int map_size;
> unsigned long tmp_addr;
> size_t alloc_size;
> + enum pcpu_chunk_type type;
>
> #define PCPU_SETUP_BUG_ON(cond) do {
> \
> if (unlikely(cond)) { \
> @@ -2384,13 +2521,18 @@ void __init pcpu_setup_first_chunk(const struct
> pcpu_alloc_info *ai,
>* empty chunks.
>*/
> pcpu_nr_slots = __pcpu_size_to_slot(pcpu_unit_size) + 2;
> - pcpu_slot = memblock_alloc(pcpu_nr_slots * sizeof(pcpu_slot[0]),
> -SMP_CACHE_BYTES);
> - if (!pcpu_slot)
> + pcpu_chunk_lists = memblock_alloc(pcpu_nr_slots *
> + sizeof(pcpu_chunk_lists[0]) *
> + PCPU_NR_CHUNK_TYPES,
> + SMP_CACHE_BYTES);
> + if (!pcpu_chunk_lists)
> panic("%s: Failed to allocate %zu bytes\n", __func__,
> - pcpu_nr_slots * sizeof(pcpu_slot[0]));
> - for (i = 0; i < pcpu_nr_slots; i++)
> - INIT_LIST_HEAD(&pcpu_slot[i]);
> + pcpu_nr_slots * sizeof(pcpu_chunk_lists[0]) *
> + PCPU_NR_CHUNK_TYPES);
> +
> + for (type = 0; type < PCPU_NR_CHUNK_TYPES; type++)
> + for (i = 0; i < pcpu_nr_slots; i++)
> + INIT_LIST_HEAD(&pcpu_chunk_list(type)[i]);
>
> /*
>* The end of the static region needs to be aligned with the
> --
> 2.25.4
>
There were just 2 minor nits. Do you mind resending with them fixed as
I'm not sure I'll be carrying these patches or not.
Acked-by: Dennis Zhou
Thanks,
Dennis
u_chunk *chunk,
> int off)
> pcpu_block_update_hint_free(chunk, bit_off, bits);
>
> pcpu_chunk_relocate(chunk, oslot);
> +
> + return freed;
> }
>
> static void pcpu_init_md_block(struct pcpu_block_md *block, int nr_bits)
> --
> 2.25.4
>
Sorry for the delay.
Acked-by: Dennis Zhou
What's the status of the depending patches? It might be easiest to have
Andrew pick these up once the depending patch series is settled.
Thanks,
Dennis
On Tue, May 19, 2020 at 01:18:03PM -0700, Roman Gushchin wrote:
> Percpu memory is becoming more and more widely used by various
> subsystems, and the total amount of memory controlled by the percpu
> allocator can make a good part of the total memory.
>
> As an example, bpf maps can consume a lot
On Thu, Apr 30, 2020 at 11:43:20PM +0100, Filipe Manana wrote:
> On Thu, Apr 30, 2020 at 11:23 PM Dennis Zhou wrote:
> >
> > On Thu, Apr 30, 2020 at 02:40:18PM -0700, Andrew Morton wrote:
> > > On Thu, 30 Apr 2020 17:43:56 +0100 fdman...@kernel.org wrote:
> >
nit() (and therefore percpu_alloc()) is holding
> > either the btrfs commit_root semaphore or a transaction handle (done at
> > fs/btrfs/backref.c:iterate_extent_inodes()), which prevents reclaim from
> > finishing as an attempt to commit the current btrfs transaction will
> > dea
erent address
> spaces)
> mm/vmstat.c:825:29:expected signed char [noderef] *__p
> mm/vmstat.c:825:29:got signed char *
> mm/vmstat.c:825:29: warning: incorrect type in initializer (different address
> spaces)
> mm/vmstat.c:825:29:expected signed char [noderef] *__p
Hi Linus,
This pull request has a couple updates to clean up the code with no
change in behavior.
Thanks,
Dennis
The following changes since commit 6fbc7275c7a9ba97877050335f290341a1fd8dbf:
Linux 5.2-rc7 (2019-06-30 11:25:36 +0800)
are available in the Git repository at:
git://git.kernel.
On Thu, Aug 29, 2019 at 02:06:05PM -0500, Gustavo A. R. Silva wrote:
> One of the more common cases of allocation size calculations is finding
> the size of a structure that has a zero-sized array at the end, along
> with memory for some number of elements for that array. For example:
>
> struct p
On Tue, Jul 30, 2019 at 02:13:25PM -0700, sathyanarayanan kuppuswamy wrote:
>
> On 7/30/19 1:54 PM, Dave Hansen wrote:
> > On 7/30/19 1:46 PM, Uladzislau Rezki wrote:
> > > > + /*
> > > > +* If required width exeeds current VA block, move
> > > > +* ba
it into per-node areas that I know of.
>
> I did encounter this issue on a system with ~100 logical CPUs, which is
> a moderate amount these days.
>
Percpu memory does have this restriction when we embed the first chunk
as we need to preserve the offsets. So that is when we'd require
multiple areas in the vma.
I didn't see the original patches come through, but this seems like it
restores the original functionality. FWIW, this way of finding space
isn't really smart, so it's possible we want to revisit this.
Acked-by: Dennis Zhou
Thanks,
Dennis
On Sun, Jul 21, 2019 at 11:56:33AM +0200, Christophe JAILLET wrote:
> s/perpcu/percpu/
>
> Signed-off-by: Christophe JAILLET
> ---
> mm/percpu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/percpu.c b/mm/percpu.c
> index 9821241fdede..febf7c7c888e 100644
> --- a/m
Hi Linus,
This pull request includes changes to let percpu_ref release the backing
percpu memory earlier after it has been switched to atomic in cases
where the percpu ref is not revived. This will help recycle percpu
memory earlier in cases where the refcounts are pinned for prolonged
periods of
Hi Andrey, Alexander, and Dmitry,
It was reported to me that when percpu is ran with param
percpu_alloc=page or the embed allocation scheme fails and falls back to
page that a double fault occurs.
I don't know much about how kasan works, but a difference between the
two is that we manually reserv
On Mon, Jul 08, 2019 at 02:52:09PM +0200, Arnd Bergmann wrote:
> gcc complains that pcpu_page_first_chunk() might return an uninitialized
> error code when the loop is never entered:
>
> mm/percpu.c: In function 'pcpu_page_first_chunk':
> mm/percpu.c:2929:9: error: 'rc' may be used uninitialized i
On Wed, Jul 03, 2019 at 04:25:52PM +0800, Kefeng Wang wrote:
> pcpu_setup_first_chunk() will panic or BUG_ON if the are some
> error and doesn't return any error, hence it can be defined to
> return void.
>
> Signed-off-by: Kefeng Wang
> ---
> arch/ia64/mm/contig.c| 5 +
> arch/ia64/mm/
changes up to 198790d9a3aeaef5792d33a560020861126edc22:
percpu: remove spurious lock dependency between percpu and sched (2019-05-08
12:08:48 -0700)
--------
Dennis Zhou (12):
percpu: update free path with correct new free region
On Thu, May 09, 2019 at 09:53:43AM -0700, Tejun Heo wrote:
> On Tue, May 07, 2019 at 10:01:47AM -0700, Roman Gushchin wrote:
> > In most cases percpu reference counters are not switched to the
> > percpu mode after they reach the atomic mode. Some obvious exceptions
> > are reference counters which
On Wed, May 08, 2019 at 12:04:08PM -0700, Eric Dumazet wrote:
> On Wed, May 8, 2019 at 11:59 AM Dennis Zhou wrote:
> >
> > On Tue, May 07, 2019 at 06:43:20PM -0700, John Sperbeck wrote:
> > > In free_percpu() we sometimes call pcpu_schedule_balance_work() to
> > >
On Tue, May 07, 2019 at 06:43:20PM -0700, John Sperbeck wrote:
> In free_percpu() we sometimes call pcpu_schedule_balance_work() to
> queue a work item (which does a wakeup) while holding pcpu_lock.
> This creates an unnecessary lock dependency between pcpu_lock and
> the scheduler's pi_lock. Ther
Hi Linus,
This stops printing the base address of percpu memory on initialization.
Thanks,
Dennis
The following changes since commit 9e98c678c2d6ae3a17cb2de55d17f69dddaa231b:
Linux 5.1-rc1 (2019-03-17 14:22:26 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/lin
On Wed, Feb 27, 2019 at 09:18:27PM -0500, Dennis Zhou wrote:
> Hi everyone,
>
> It was reported a while [1] that an increase in allocation alignment
> requirement [2] caused the percpu memory allocator to do significantly
> more work.
>
> After spending quite a bit of ti
Hi Linus,
There are 2 minor changes to the percpu allocator this merge window:
* for loop condition that could be out of bounds on multi-socket UP
* cosmetic removal of pcpu_group_offsets[0] in UP code as it is 0
There has been an interest in having better alignment with percpu
allocations. Thi
On Mon, Mar 04, 2019 at 10:33:52AM +, Peng Fan wrote:
> pcpu_find_block_fit is not find block index, it is to find
> the bitmap off in a chunk.
>
> Signed-off-by: Peng Fan
> ---
>
> V1:
> Based on https://patchwork.kernel.org/cover/10832459/ applied linux-next
>
> mm/percpu.c | 2 +-
> 1
On Sun, Mar 03, 2019 at 06:01:42AM +, Peng Fan wrote:
> Hi Dennis
>
> > -Original Message-
> > From: owner-linux...@kvack.org [mailto:owner-linux...@kvack.org] On
> > Behalf Of Dennis Zhou
> > Sent: 2019年2月28日 10:19
> > To: Dennis Zhou ; Tejun Heo ;
On Sun, Mar 03, 2019 at 08:18:49AM +, Peng Fan wrote:
>
>
> > -Original Message-
> > From: owner-linux...@kvack.org [mailto:owner-linux...@kvack.org] On
> > Behalf Of Dennis Zhou
> > Sent: 2019年2月28日 10:19
> > To: Dennis Zhou ; Tejun Heo ; Christ
On Sat, Mar 02, 2019 at 01:55:54PM +, Peng Fan wrote:
> Hi Dennis,
>
> > -Original Message-
> > From: owner-linux...@kvack.org [mailto:owner-linux...@kvack.org] On
> > Behalf Of Dennis Zhou
> > Sent: 2019年2月28日 10:19
> > To: Dennis Zhou ; Tejun
On Sat, Mar 02, 2019 at 01:48:20PM +, Peng Fan wrote:
>
>
> > -Original Message-
> > From: owner-linux...@kvack.org [mailto:owner-linux...@kvack.org] On
> > Behalf Of Dennis Zhou
> > Sent: 2019年2月28日 10:19
> > To: Dennis Zhou ; Tejun Heo ; Christ
On Sat, Mar 02, 2019 at 01:37:37PM +, Peng Fan wrote:
> Hi Dennis,
>
> > -Original Message-
> > From: owner-linux...@kvack.org [mailto:owner-linux...@kvack.org] On
> > Behalf Of Dennis Zhou
> > Sent: 2019年2月28日 10:19
> > To: Dennis Zhou ; Tejun
On Sat, Mar 02, 2019 at 01:32:04PM +, Peng Fan wrote:
> Hi Dennis,
>
> > -Original Message-
> > From: owner-linux...@kvack.org [mailto:owner-linux...@kvack.org] On
> > Behalf Of Dennis Zhou
> > Sent: 2019年2月28日 10:18
> > To: Dennis Zhou ; Tejun
might get lost. To get
> the appropriate people and lists, run:
>
> scripts/get_maintainer.pl YOUR_PATCH.patch.
>
> For this patch, you'll get this:
>
> Dennis Zhou (maintainer:PER-CPU MEMORY ALLOCATOR)
> Tejun Heo (maintainer:PER-CPU MEMORY ALLOCATOR)
> Chr
contig_hint == scan_hint, then scan_hint_start > contig_hint_start.
This is necessary for scan_hint discovery when refreshing a block.
Signed-off-by: Dennis Zhou
---
mm/percpu-internal.h | 9
mm/percpu.c | 101 ---
2 files changed,
y
the chunk's pcpu_block_md.
Signed-off-by: Dennis Zhou
---
mm/percpu-internal.h | 5 +-
mm/percpu-stats.c| 5 +-
mm/percpu.c | 120 +++
3 files changed, 57 insertions(+), 73 deletions(-)
diff --git a/mm/percpu-internal.h b/mm/percpu-intern
the allocation request.
Signed-off-by: Dennis Zhou
---
mm/percpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/percpu.c b/mm/percpu.c
index b40112b2fc59..c996bcffbb2a 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -234,7 +234,7 @@ static int pcpu_chunk_slot(const struct
locks.
Signed-off-by: Dennis Zhou
---
mm/percpu.c | 36 +++-
1 file changed, 27 insertions(+), 9 deletions(-)
diff --git a/mm/percpu.c b/mm/percpu.c
index 197479f2c489..40d49d7fb286 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -711,20 +711,31 @@ static
by only scanning
forward using the scan_hint introduced later too.
Signed-off-by: Dennis Zhou
---
include/linux/percpu.h | 12 ++---
mm/percpu-km.c | 2 +-
mm/percpu.c| 111 +
3 files changed, 49 insertions(+), 76 deletions(-)
diff --gi
regions are updated manually in
pcpu_block_update_hint_free().
Signed-off-by: Dennis Zhou
---
mm/percpu.c | 23 +--
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/mm/percpu.c b/mm/percpu.c
index dac18968d79f..e51c151ed692 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
nts to be managed as a pcpu_block_md.
Signed-off-by: Dennis Zhou
---
mm/percpu-internal.h | 1 +
mm/percpu.c | 20 +---
2 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/mm/percpu-internal.h b/mm/percpu-internal.h
index ec58b244545d..119bd1119aa7 100644
--- a
t_off >= end and the correctness of the
hints from pcpu_find_block_fit().
This patch fixes this by bounding the end offset by the number of bits
in a chunk.
Signed-off-by: Dennis Zhou
---
mm/percpu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mm/percpu.c b/mm/percpu
possible free areas, smaller allocations will
eventually fill those holes.
Signed-off-by: Dennis Zhou
---
mm/percpu.c | 101 ++--
1 file changed, 99 insertions(+), 2 deletions(-)
diff --git a/mm/percpu.c b/mm/percpu.c
index df1aacf58ac8..dac18968d79f
the chunk is moved to the empty list. Once an
allocation is freed from that chunk, it is placed back into rotation.
Signed-off-by: Dennis Zhou
---
mm/percpu.c | 35 ++-
1 file changed, 26 insertions(+), 9 deletions(-)
diff --git a/mm/percpu.c b/mm/percpu.c
in
While block hints were always accurate, it's possible when spanning
across blocks that we miss updating the chunk's contig_hint. Rather than
rely on correctness of the boundaries of hints, do a full overlap
comparison.
Signed-off-by: Dennis Zhou
---
mm/per
sponsible
for more bits. 0011-0012 add chunk scan_hints.
This patchset is on top of percpu#master a3b22b9f11d9.
diffstats below:
Dennis Zhou (12):
percpu: update free path with correct new free region
percpu: do not search past bitmap when allocating an area
percpu: introduce helper to det
the start. Fix this by using (end - start) as this is only
called when updating a hint within a block.
Signed-off-by: Dennis Zhou
---
mm/percpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/percpu.c b/mm/percpu.c
index db86282fd024..53bd79a617b1 100644
--- a/mm/percpu.
On Wed, Feb 27, 2019 at 07:36:50PM +0100, David Sterba wrote:
> On Wed, Feb 27, 2019 at 01:29:16PM -0500, Dennis Zhou wrote:
> > > I've noticed while reading the code, why do you use the indirect call
> > > here? The wsm.ops points to btrfs_zstd_compress so free
While calling functions inside zstd, we don't need to use the
indirection provided by the workspace_manager. Forward declarations are
added to maintain the function order of btrfs_compress_op.
Signed-off-by: Dennis Zhou
---
fs/btrfs/zstd.c | 11 +++
1 file changed, 7 insertions(
On Wed, Feb 27, 2019 at 05:44:41PM +0100, David Sterba wrote:
> On Fri, Feb 22, 2019 at 02:53:48PM -0500, Dennis Zhou wrote:
> > The timer function, zstd_reclaim_timer_fn(), reschedules itself under
> > certain conditions. When cleaning up, take the lock and remove all
>
On Wed, Feb 27, 2019 at 01:33:15PM +, Peng Fan wrote:
> Hi Dennis,
>
> > -Original Message-
> > From: Dennis Zhou [mailto:den...@kernel.org]
> > Sent: 2019年2月27日 1:33
> > To: Peng Fan
> > Cc: den...@kernel.org; t...@kernel.org; c...@linux.com;
On Wed, Feb 27, 2019 at 01:02:16PM +, Peng Fan wrote:
> Hi Dennis
>
> > -Original Message-
> > From: Dennis Zhou [mailto:den...@kernel.org]
> > Sent: 2019年2月27日 1:04
> > To: Christopher Lameter
> > Cc: Peng Fan ; t...@kernel.org; linux...@kvack.o
On Tue, Feb 26, 2019 at 12:09:28AM +, Peng Fan wrote:
> Hi Dennis,
>
> > -Original Message-
> > From: den...@kernel.org [mailto:den...@kernel.org]
> > Sent: 2019年2月25日 23:24
> > To: Peng Fan
> > Cc: t...@kernel.org; c...@linux.com; linux...@kvack.org;
> > linux-kernel@vger.kernel.org;
On Tue, Feb 26, 2019 at 03:16:44PM +, Christopher Lameter wrote:
> On Mon, 25 Feb 2019, Dennis Zhou wrote:
>
> > > @@ -27,7 +27,7 @@
> > > * chunk size is not aligned. percpu-km code will whine about it.
> > > */
> > >
On Tue, Feb 26, 2019 at 03:15:50PM +, Christopher Lameter wrote:
> On Mon, 25 Feb 2019, den...@kernel.org wrote:
>
> > > @@ -67,7 +67,7 @@ static struct pcpu_chunk *pcpu_create_chunk(gfp_t gfp)
> > > pcpu_set_page_chunk(nth_page(pages, i), chunk);
> > >
> > > chunk->data = pages;
>
On Sun, Feb 24, 2019 at 01:13:43PM +, Peng Fan wrote:
> percpu-km could only be selected by NEED_PER_CPU_KM which
> depends on !SMP, so CONFIG_SMP will be false when choose percpu-km.
>
> Signed-off-by: Peng Fan
> ---
> mm/percpu-km.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Hi Peng,
On Wed, Feb 20, 2019 at 01:32:55PM +, Peng Fan wrote:
> group_cnt array is defined with NR_CPUS entries, but normally
> nr_groups will not reach up to NR_CPUS. So there is no issue
> to the current code.
>
> Checking other parts of pcpu_build_alloc_info, use nr_groups as
> check cond
unloading.
Signed-off-by: Dennis Zhou
---
v2:
- cleanup workspaces and then disable the timer
fs/btrfs/zstd.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/zstd.c b/fs/btrfs/zstd.c
index 3e418a3aeb11..6b9e29d050f3 100644
--- a/fs/btrfs/zstd.c
+++ b/fs/bt
On Fri, Feb 22, 2019 at 02:17:41PM +0200, Nikolay Borisov wrote:
>
>
> On 21.02.19 г. 22:25 ч., Dennis Zhou wrote:
> > The timer function, zstd_reclaim_timer_fn(), reschedules itself under
> > certain conditions. Switch to del_timer_sync() to ensure that the timer
> >
1 - 100 of 250 matches
Mail list logo