Function is going to be used in transport over RDMA module
in subsequent patches.
Function returns next element in round-robin fashion,
i.e. head will be skipped. NULL will be returned if list
is observed as empty.
Signed-off-by: Roman Pen
Cc: Paul E. McKenney
Cc: linux-kernel@vger.kernel.org
Function is going to be used in transport over RDMA module
in subsequent patches.
Signed-off-by: Roman Pen
Cc: Tejun Heo
Cc: linux-kernel@vger.kernel.org
---
fs/sysfs/file.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
index 5c13f29bfcdb..ff7443ac2aa7
of
devices and hctxs, when looping issue does not impact much).
--
Roman
Signed-off-by: Roman Pen
Cc: linux-kernel@vger.kernel.org
Cc: linux-bl...@vger.kernel.org
Cc: Bart Van Assche
Cc: Christoph Hellwig
Cc: Hannes Reinecke
Cc: Jens Axboe
---
block/blk-mq-sched.c | 10 +-
blo
ollow.
[1] Message id:
CAJrWOzD6Xq==b-zYCDdFLgSRMPM-NkNuTSDFEtX=7mret45...@mail.gmail.com
Signed-off-by: Roman Pen
Signed-off-by: Mikhail Sennikovskii
Cc: Paolo Bonzini
Cc: Radim Krčmář
Cc: k...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
arch/x86/kvm/svm.c | 24 +++---
e iterator is set to NULL to indicate that
end of the loop is reached.
Signed-off-by: Roman Pen
Cc: Namjae Jeon
Cc: "Theodore Ts'o"
Cc: Andreas Dilger
Cc: linux-e...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
fs/ext4/extents.c | 18 --
1 file change
ext4_find_extents() call inside ext4_ext_shift_extents function.
Signed-off-by: Roman Pen
Cc: Namjae Jeon
Cc: "Theodore Ts'o"
Cc: Andreas Dilger
Cc: linux-e...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
fs/ext4/extents.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-
.
2. Inside ext4_ext_shift_extents() function ext4_find_extent() is called
without EXT4_EX_NOCACHE flag, which should prevent cache population. This
leads to outdated offsets in the extents tree and wrong data blocks, which
can be observed doing read(). That is also quite well reproduced by the
test above.
T
e iterator is set to NULL to indicate that
end of the loop is reached.
Signed-off-by: Roman Pen
Cc: Namjae Jeon
Cc: "Theodore Ts'o"
Cc: Andreas Dilger
Cc: linux-e...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
fs/ext4/extents.c | 18 --
1 file change
ved doing read(). That is also quite well reproduced by the
test above.
This is fixed by the second patch.
3. Just a minor optimization: linear search of a extent inside a block is
replaced by a binsearch. This is the third patch.
Roman Pen (3):
ext4: Include forgotten start block on fallocate
The aim of this patch is to optimize a search of an extent while
doing right shift using binsearch.
Cc: Namjae Jeon
Cc: "Theodore Ts'o"
Cc: Andreas Dilger
Cc: linux-e...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
fs/ext4/extents.c | 13 +
1 file changed, 9 insertions(+),
ext4_find_extents() call inside ext4_ext_shift_extents function.
Signed-off-by: Roman Pen
Cc: Namjae Jeon
Cc: "Theodore Ts'o"
Cc: Andreas Dilger
Cc: linux-e...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
fs/ext4/extents.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-
e ignored.
Signed-off-by: Roman Pen
Cc: Andy Lutomirski
Cc: Oleg Nesterov
Cc: Peter Zijlstra
Cc: Thomas Gleixner
Cc: Ingo Molnar
Cc: Tejun Heo
Cc: linux-kernel@vger.kernel.org
---
v4:
o instead of TASK_DEAD state use more generic PF_EXITING flag.
o same dead task check should be also
->vfork_done is already NULL, so next attempt to grab alive
kthread pointer will fail.
Signed-off-by: Roman Pen
Cc: Andy Lutomirski
Cc: Oleg Nesterov
Cc: Peter Zijlstra
Cc: Thomas Gleixner
Cc: Ingo Molnar
Cc: Tejun Heo
Cc: linux-kernel@vger.kernel.org
---
kernel/kthread.c |
o_exit(). The major thing is that the last
put is happens *after* completion_vfork_done() is invoked.
Signed-off-by: Roman Pen
Cc: Andy Lutomirski
Cc: Oleg Nesterov
Cc: Peter Zijlstra
Cc: Thomas Gleixner
Cc: Ingo Molnar
Cc: Tejun Heo
Cc: linux-kernel@vger.kernel.org
---
v3:
o handle to_li
e ignored.
Signed-off-by: Roman Pen
Cc: Andy Lutomirski
Cc: Oleg Nesterov
Cc: Peter Zijlstra
Cc: Thomas Gleixner
Cc: Ingo Molnar
Cc: Tejun Heo
Cc: linux-kernel@vger.kernel.org
---
v3:
o minor comment and coding style fixes.
v2:
o put a task->state check directly into a wq_worker_sleepin
truct kthread' are merged into one 'struct kthread' and its freeing
is controlled by a reference counter.
The last reference on kthread is put from a task work, the callback,
which is invoked from do_exit(). The major thing is that the last
put is happens *after* completion_vfork_done()
e ignored.
Signed-off-by: Roman Pen
Cc: Andy Lutomirski
Cc: Oleg Nesterov
Cc: Peter Zijlstra
Cc: Thomas Gleixner
Cc: Ingo Molnar
Cc: Tejun Heo
Cc: linux-kernel@vger.kernel.org
---
v2:
o put a task->state check directly into a wq_worker_sleeping() function
instead of changing th
bug dead tasks must be ignored.
Signed-off-by: Roman Pen
Cc: Andy Lutomirski
Cc: Josh Poimboeuf
Cc: Borislav Petkov
Cc: Brian Gerst
Cc: Denys Vlasenko
Cc: H. Peter Anvin
Cc: Peter Zijlstra
Cc: Thomas Gleixner
Cc: Ingo Molnar
Cc: Tejun Heo
Cc: linux-kernel@vger.kernel.org
---
kernel/sc
on garbage memory).
Signed-off-by: Roman Pen
Cc: Andy Lutomirski
Cc: Josh Poimboeuf
Cc: Borislav Petkov
Cc: Brian Gerst
Cc: Denys Vlasenko
Cc: H. Peter Anvin
Cc: Peter Zijlstra
Cc: Thomas Gleixner
Cc: Ingo Molnar
Cc: Tejun Heo
Cc: x...@kernel.org
Cc: linux-kernel@vger.kernel.org
---
a
lly that can help to catch incorrect usage
of percpu-refcount.
Signed-off-by: Roman Pen
Cc: Tejun Heo
Cc: linux-kernel@vger.kernel.org
---
lib/percpu-refcount.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/lib/percpu-refcount.c b/lib/percpu-refcount.c
index 6111bcb..9c110e0 1006
&ref);
percpu_ref_exit(&ref);
Also this patch includes inition to NULL of confirm_switch callback.
Without this inition you have to zero out a chunk of memory or kernel
frightfully complains with WARN_ON_ONCE(ref->confirm_switch) at
__percpu_ref_switch_to_atomic.
Signed-off-by: Roman Pen
1] Message id: 1443287365-4244-7-git-send-email-akinobu.m...@gmail.com
[2] Message id: 1443563240-29306-6-git-send-email...@kernel.org
Signed-off-by: Roman Pen
Cc: Akinobu Mita
Cc: Tejun Heo
Cc: Jens Axboe
Cc: Christoph Hellwig
Cc: linux-bl...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
&ref);
percpu_ref_exit(&ref);
Also this patch includes inition to NULL of confirm_switch callback.
Without this inition you have to zero out a chunk of memory or kernel
frightfully complains with WARN_ON_ONCE(ref->confirm_switch) at
__percpu_ref_switch_to_atomic.
Signed-off-by: Roman Pen
_depth(shared_tags):
blk_mq_freeze_queue(q1)
blk_cleanup_queue(q1) ...
blk_mq_freeze_queue(q1) <<<->>> blk_mq_unfreeze_queue(q1)
[1] Message id: 1443287365-4244-7-git-send-email-akinobu.m...@gmail.com
[2] Message id: 1443563240-29306-6-git-send-email...@kern
an explicit full barrier , which guarantees
that clear of PENDING bit is to be executed before all possible
speculative LOADS or STORES inside actual work function.
Signed-off-by: Roman Pen
Cc: Gioh Kim
Cc: Michael Wang
Cc: Tejun Heo
Cc: Jens Axboe
Cc: linux-bl...@vger.kernel.org
Cc: linux-
n reproduce
this bug in several minutes on a specific load (I tried many other
simple loads using fio, even using btrecord/btreplay, no success).
And that easy reproduction on a specific load gives me some freedom
to test and then to be sure, that problem has gone.
Signed-off-by: Roman Pen
Cc: Te
The issue is fixed by increasing inode i_nlink references for current
and parent inodes.
Signed-off-by: Roman Pen
Cc: Greg Kroah-Hartman
Cc: linux-kernel@vger.kernel.org
---
fs/debugfs/inode.c | 4
1 file changed, 4 insertions(+)
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
in
; \
done
# lsmod | grep brd
brd 5175 100
Now brd module has 100 references.
The issue is fixed by calling module_put() just right away put_disk().
Signed-off-by: Roman Pen
Cc: Gi-Oh Kim
Cc: Tejun Heo
Cc: Jens Axboe
Cc: linux-bl...@vger.kernel.org
Cc: linu
erence on
get and decreases it on put.
Roman Pen (4):
block: fix module reference leak on put_disk() call for cgroups
throttle
block: introduce new call put_gendisk() in genhd.c
block,fs: switch to a new put_gendisk() call
hibernate: fix disk and module leak on successfull resume
blo
get rid of modules references leak, which happens if
disk was received by get_gendisk() call, but then was put by put_disk(),
without corresponding module_put().
Also function description is updated.
Signed-off-by: Roman Pen
Cc: Gi-Oh Kim
Cc: Jens Axboe
Cc: Dan Williams
Cc: Sagi Grimberg
Cc
Do not forget to put the disk back.
Signed-off-by: Roman Pen
Cc: Gi-Oh Kim
Cc: "Rafael J. Wysocki"
Cc: Len Brown
Cc: Pavel Machek
Cc: linux...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
kernel/power/hibernate.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
() sequences are replaced with a single
put_gendisk() call.
Signed-off-by: Roman Pen
Cc: Gi-Oh Kim
Cc: Tejun Heo
Cc: Jens Axboe
Cc: Alexander Viro
Cc: linux-bl...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-fsde...@vger.kernel.org
---
block/blk-cgroup.c | 15 +++
fs
the reference
on a kobject, but keeping the devt number still occupied till the last free.
Signed-off-by: Roman Pen
Cc: Keith Busch
Cc: Jens Axboe
Cc: sta...@kernel.org
Cc: linux-kernel@vger.kernel.org
---
block/genhd.c | 25 ++---
block/partition-generic.c |
+0x2d/0x3b
[debugfs_example2]
[ 86.300453] [] SyS_delete_module+0x16b/0x220
[ 86.300750] [] entry_SYSCALL_64_fastpath+0x12/0x6a
[ 86.301198] ---[ end trace c9fc53353fe14a37 ]---
Signed-off-by: Roman Pen
Cc: Greg Kroah-Hartman
Cc: linux-kernel@vger.kernel.org
---
fs/debugfs/inode.c | 4 ++
). And if so - deadlock will happen.
Probably, dentry_remove_self() should be implemented for such cases, which is
similar to sysfs_remove_file_self(). But for now I do not want to add new
function which can be useless in the nearest future.
Signed-off-by: Roman Pen
Cc: Greg Kroah-Hartman
Cc: linux-kern
I will need dentry->d_fsdata in the next patch.
Keep 'd_fsdata' for debugfs needs.
Signed-off-by: Roman Pen
Cc: Greg Kroah-Hartman
Cc: linux-kernel@vger.kernel.org
---
fs/debugfs/inode.c | 28 ++--
1 file changed, 22 insertions(+), 6 deletions(-)
di
automount inodes and increased i_nlink references because
of WARNING at fs/inode.c:273 drop_nlink.
Cc: Greg Kroah-Hartman
Cc: linux-kernel@vger.kernel.org
Roman Pen (3):
debugfs: fix automount inode i_nlink references
debugfs: put private data to i_private for automount inode
debugfs:
Include description of 'debugfs_create_dir_with_tmpfiles()' call.
Signed-off-by: Roman Pen
Cc: Greg Kroah-Hartman
Cc: linux-kernel@vger.kernel.org
---
Documentation/filesystems/debugfs.txt | 25 +
1 file changed, 25 insertions(+)
diff --git a/Documentation/f
Now __create_dir() accepts inode operations and private data.
I will use this generic call in next path to create directory
with temporary files.
Signed-off-by: Roman Pen
Cc: Greg Kroah-Hartman
Cc: linux-kernel@vger.kernel.org
---
fs/debugfs/inode.c | 48
he file name in 'i_fop->open' callback and can
return an error if temporary file name does not match some criteria.
Created temporary file will not appear in any lookups, further linking is
forbidden, corresponding dentry and inode will be freed when last file
descriptor is closed.
Signed-
othing to configure (what
I have described is not a configuration issue), and I do not like to keep
dentries in a system if userspace forgets to remove them.
Cc: Greg Kroah-Hartman
Cc: linux-kernel@vger.kernel.org
Roman Pen (3):
debugfs: make create directory logic more generic
s till active, thus new request will be
stuck forever in the queue.
How to fix?
Do flush plug list till it becomes empty.
Signed-off-by: Roman Pen
Cc: Jens Axboe
Cc: linux-kernel@vger.kernel.org
Cc: sta...@vger.kernel.org
---
block/blk-core.c | 10 ++
block/blk-mq.c | 13 +
2
in a newly allocated block or some
free slots should be found in a free list.
Seems it does not look dramatically awful.
I would like to receive comments on the following three patches.
Thanks.
Changelog since v1:
- Indentation tweaks (fix checkpatch warnings).
- Provided profiling measurem
sequence should be repeated, seems it is not efficient.
In this patch newly allocated block is occupied right away, address of virtual
space is returned to the caller, so there is no any need to repeat the search
sequence, allocation job is done.
Signed-off-by: Roman Pen
Cc: Andrew Morton
Cc: Eric
nally vm_unmap_aliases should be slightly faster and the whole vmap_block
structure occupies less memory.
Signed-off-by: Roman Pen
Cc: Zhang Yanfei
Cc: Andrew Morton
Cc: Eric Dumazet
Acked-by: Joonsoo Kim
Cc: David Rientjes
Cc: WANG Chao
Cc: Fabian Frederick
Cc: Christoph Lameter
Cc: Gioh Kim
Cc: Rob
using
older blocks with possible holes left.
Signed-off-by: Roman Pen
Cc: Andrew Morton
Cc: Eric Dumazet
Acked-by: Joonsoo Kim
Cc: David Rientjes
Cc: WANG Chao
Cc: Fabian Frederick
Cc: Christoph Lameter
Cc: Gioh Kim
Cc: Rob Jones
Cc: linux...@kvack.org
Cc: linux-kernel@vger.kernel.org
Cc:
nally vm_unmap_aliases should be slightly faster and the whole vmap_block
structure occupies less memory.
Signed-off-by: Roman Pen
Cc: Nick Piggin
Cc: Zhang Yanfei
Cc: Andrew Morton
Cc: Eric Dumazet
Cc: Joonsoo Kim
Cc: David Rientjes
Cc: WANG Chao
Cc: Fabian Frederick
Cc: Christoph Lameter
Cc: Gioh Ki
sequence should be repeated, seems it is not efficient.
In this patch newly allocated block is occupied right away, address of virtual
space is returned to the caller, so there is no any need to repeat the search
sequence, allocation job is done.
Signed-off-by: Roman Pen
Cc: Nick Piggin
Cc: Andrew
range values to make the logic simpler.
I would like to receive comments on the following three patches.
Thanks.
Roman Pen (3):
mm/vmalloc: fix possible exhaustion of vmalloc space caused by
vm_map_ram allocator
mm/vmalloc: occupy newly allocated vmap block just after allocation
mm/vmalloc
ing a chance to resolve allocation request using
older blocks with possible holes left.
Signed-off-by: Roman Pen
Cc: Andrew Morton
Cc: Nick Piggin
Cc: Eric Dumazet
Cc: Joonsoo Kim
Cc: David Rientjes
Cc: WANG Chao
Cc: Fabian Frederick
Cc: Christoph Lameter
Cc: Gioh Kim
Cc: Rob Jones
Cc
ged, 6 insertions(+), 3 deletions(-)
Signed-off-by: Roman Pen
Cc: Russell King
Cc: Christoffer Dall
Cc: Stefano Stabellini
Cc: Sekhar Nori
Cc: Kees Cook
Cc: Andy Lutomirski
Cc: Eric Paris
Cc: Will Deacon
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: Marc Zyngi
ber, currently it is zero.
Patch fixes this:
$ cat /proc/self/syscall
3 0x3 0xbefc7bd8 0x1000 0x0 0xac9e0 0x3 0xbefc7bb4 0xb6e82fbc
^
Right, read syscall
Signed-off-by: Roman Pen
Cc: Russell King
Cc: Marc Zyngier
Cc: Catalin Marinas
Cc: Christoffer Dall
Cc: Stefano Stabellini
Cc: Sekhar Nori
In previous patch current_thread_info()->syscall is set with
corresponding syscall number prior to further calls, thus there
is no any need to pass 'scno'.
Also, add explicit comment why do we have to reread 'scno' local
variable.
Signed-off-by: Roman Pen
Cc: Russell Kin
xed, and firmware_request logic needs
some refactoring.
Probably, there are other good questions which I do not see because
of shallow understanding of init and firmware loading sequences.
Signed-off-by: Roman Pen
Cc: Ming Lei
Cc: Greg Kroah-Hartman
Cc: Andrew Morton
Cc: Oleg Nesterov
Cc: l
xed, and firmware_request logic needs
some refactoring.
Probably, there are other good questions which I do not see because
of shallow understanding of init and firmware loading sequences.
Signed-off-by: Roman Pen
Cc: Ming Lei
Cc: Greg Kroah-Hartman
Cc: Andrew Morton
Cc: Oleg Nesterov
Cc: l
xed, and firmware_request logic needs
some refactoring.
Probably, there are other good questions which I do not see because
of shallow understanding of init and firmware loading sequences.
Signed-off-by: Roman Pen
Cc: Ming Lei
Cc: Greg Kroah-Hartman
Cc: Andrew Morton
Cc: Oleg Nesterov
Cc: l
already specify how many chars do we expect.
Also we can avoid second ',8' and use simple '\s{8}'.
Signed-off-by: Roman Pen
Cc: Andy Whitcroft
Cc: Joe Perches
Cc: linux-kernel@vger.kernel.org
---
scripts/checkpatch.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
di
xed, and firmware_request logic needs
some refactoring.
Probably, there are other good questions which I do not see because
of shallow understanding of init and firmware loading sequences.
Signed-off-by: Roman Pen
Cc: Ming Lei
Cc: Greg Kroah-Hartman
Cc: Andrew Morton
Cc: Oleg Nesterov
Cc: l
uences.
Cc: Ming Lei
Cc: Greg Kroah-Hartman
Cc: Andrew Morton
Cc: Paul Gortmaker
Cc: Rob Landley
Cc: Randy Dunlap
Cc: "Kirill A. Shutemov"
Cc: Michael Opdenacker
Cc: Peter Zijlstra
Cc: Santosh Shilimkar
Cc: Hannes Frederic Sowa
Cc: Krzysztof Mazur
Cc: Tetsuo Handa
Cc
t) in case of
MMC_CAP_NEEDS_POLL capability set.
Signed-off-by: Roman Pen
CC: Chris Ball
CC: Sascha Hauer
CC: Fabio Estevam
CC: Shawn Guo
CC: Ulf Hansson
CC: linux-...@vger.kernel.org
CC: linux-kernel@vger.kernel.org
---
drivers/mmc/host/mxs-mmc.c | 3 ++-
1 file changed, 2 insertions(+),
prioritize the IO avoiding any possible delays.
But mpage writeback path ignores marking requests as WRITE_SYNC.
This patch fixes this.
Signed-off-by: Roman Pen
Reviewed-by: Jan Kara
Cc: Jens Axboe
Cc: Tejun Heo
Cc: Andrew Morton
Cc: linux-fsde...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
From: Roman Peniaev
mtd_blkdevs is device with volatile cache (writeback buffer), so it should
support
REQ_FLUSH to do explicit flush.
Without this patch 'sync' does not guarantee that writeback buffer will be
flushed
on disk in case of power off, e.g.:
$ cp some_file /mnt
$ sync
### P
]
C R 248 + 8 [0]
C R 256 + 8 [0]
Also, the whole output summary statistics of completed requests and
final throughput will be incorrect.
This patch takes into account real completion size of the request and
fixes wrong completion accounting.
Signed-off-by: Roman Pen
CC: Jens Axboe
CC
In case of wbc->sync_mode == WB_SYNC_ALL we need to do data integrity write,
thus mark request as WRITE_SYNC.
Signed-off-by: Roman Pen
CC: Alexander Viro
CC: linux-fsde...@vger.kernel.org
CC: linux-kernel@vger.kernel.org
---
fs/mpage.c | 23 +++
1 file changed,
From: Roman Peniaev
mtd_blkdevs is device with volatile cache (writeback buffer), so it should
support
REQ_FLUSH to do explicit flush.
Without this patch 'sync' does not guarantee that writeback buffer will be
flushed
on disk in case of power off, e.g.:
$ cp some_file /mnt
$ sync
### P
65 matches
Mail list logo