[Xen-devel] [PATCH 0/2] xen/blkback: Aggressively shrink page pools if a memory pressure is detected

2019-12-04 Thread SeongJae Park
tional page allocation overhead is hidden under the much slower I/O time. SeongJae Park (2): xen/blkback: Aggressively shrink page pools if a memory pressure is detected blkback: Add a module parameter for aggressive pool shrinking duration drivers/block/xen-blkback/blkback.

[Xen-devel] [PATCH 2/2] blkback: Add a module parameter for aggressive pool shrinking duration

2019-12-04 Thread SeongJae Park
From: SeongJae Park As discussed by the previous commit ("xen/blkback: Aggressively shrink page pools if a memory pressure is detected"), the aggressive pool shrinking duration should be carefully selected: ``If it is too long, free pages pool shrinking overhead can reduce the I/O p

[Xen-devel] [PATCH 1/2] xen/blkback: Aggressively shrink page pools if a memory pressure is detected

2019-12-04 Thread SeongJae Park
From: SeongJae Park Each `blkif` has a free pages pool for the grant mapping. The size of the pool starts from zero and be increased on demand while processing the I/O requests. If current I/O requests handling is finished or 100 milliseconds has passed since last I/O requests handling

[Xen-devel] [PATCH v3 1/1] xen/blkback: Squeeze page pools if a memory pressure is detected

2019-12-09 Thread SeongJae Park
From: SeongJae Park Each `blkif` has a free pages pool for the grant mapping. The size of the pool starts from zero and be increased on demand while processing the I/O requests. If current I/O requests handling is finished or 100 milliseconds has passed since last I/O requests handling

[Xen-devel] [PATCH v3 0/1] xen/blkback: Squeeze page pools if a memory pressure

2019-12-09 Thread SeongJae Park
hes into one single patch SeongJae Park (1): xen/blkback: Squeeze page pools if a memory pressure is detected drivers/block/xen-blkback/blkback.c | 35 +++-- 1 file changed, 33 insertions(+), 2 deletions(-) -- 2.17.1 ___ Xen-de

Re: [Xen-devel] [PATCH v3 0/1] xen/blkback: Squeeze page pools if a memory pressure

2019-12-09 Thread SeongJae Park
rad.w...@oracle.com; roger@citrix.com >>> Cc: linux-bl...@vger.kernel.org; linux-ker...@vger.kernel.org; Durrant, >>> Paul ; sj38.p...@gmail.com; xen- >>> de...@lists.xenproject.org >>> Subject: Re: [PATCH v3 0/1] xen/blkback: Squeeze page pools if a memory >&g

Re: [Xen-devel] [PATCH v3 0/1] xen/blkback: Squeeze page pools if a memory pressure

2019-12-09 Thread SeongJae Park
On Mon, 9 Dec 2019 10:39:02 +0100 Juergen wrote: >On 09.12.19 09:58, SeongJae Park wrote: >> Each `blkif` has a free pages pool for the grant mapping. The size of >> the pool starts from zero and be increased on demand while processing >> the I/O requests. If current

Re: [Xen-devel] [PATCH v3 0/1] xen/blkback: Squeeze page pools if a memory pressure

2019-12-09 Thread SeongJae Park
On Mon, 9 Dec 2019 12:08:10 +0100 "Jürgen Groß" wrote: >On 09.12.19 11:52, SeongJae Park wrote: >> On Mon, 9 Dec 2019 11:15:22 +0100 "Jürgen Groß" wrote: >> >>> On 09.12.19 10:46, Durrant, Paul wrote: >>>>> -Original Message-

Re: [Xen-devel] [PATCH v5 1/2] xenbus/backend: Add memory pressure handler callback

2019-12-10 Thread SeongJae Park
On Tue, Dec 10, 2019 at 11:21 AM Roger Pau Monné wrote: > > On Tue, Dec 10, 2019 at 11:16:35AM +0100, Roger Pau Monné wrote: > > On Tue, Dec 10, 2019 at 08:06:27AM +0000, SeongJae Park wrote: > > > diff --git a/include/xen/xenbus.h b/include/xen/xenbus.h > > > in

[Xen-devel] [PATCH v4 1/2] xenbus/backend: Add memory pressure handler callback

2019-12-09 Thread SeongJae Park
From: SeongJae Park Granting pages consumes backend system memory. In systems configured with insufficient spare memory for those pages, it can cause a memory pressure situation. However, finding the optimal amount of the spare memory is challenging for large systems having dynamic resource

[Xen-devel] [PATCH v4 2/2] xen/blkback: Squeeze page pools if a memory pressure is detected

2019-12-09 Thread SeongJae Park
From: SeongJae Park Each `blkif` has a free pages pool for the grant mapping. The size of the pool starts from zero and be increased on demand while processing the I/O requests. If current I/O requests handling is finished or 100 milliseconds has passed since last I/O requests handling

[Xen-devel] [PATCH v4 0/2] xenbus/backend: Add a memory pressure handler callback

2019-12-09 Thread SeongJae Park
tch SeongJae Park (1): xen/blkback: Squeeze page pools if a memory pressure is detected drivers/block/xen-blkback/blkback.c | 35 +++-- 1 file changed, 33 insertions(+), 2 deletions(-) SeongJae Park (2): xenbus/backend: Add memory pressure handler callback xen/blkb

Re: [Xen-devel] [PATCH v5 1/2] xenbus/backend: Add memory pressure handler callback

2019-12-10 Thread SeongJae Park
riod after only should > be removed in order to tie both sentences together. > > > would be ablt to be extended for general resources. > > s/ablt/able/ > > > > > Signed-off-by: SeongJae Park > > --- > > drivers/xen/xenbus/xenbus_probe_backend.c | 31

Re: [Xen-devel] [PATCH v5 2/2] xen/blkback: Squeeze page pools if a memory pressure is detected

2019-12-10 Thread SeongJae Park
In > > other words, the additional page allocation overhead is hidden under the > > much slower I/O latency. > > > > Nevertheless, pleaset note that this is just a very simple and minimal > > test. > > I would like to add that IMO this is papering over an

[Xen-devel] [PATCH v6 0/2] xenbus/backend: Add a memory pressure handler callback

2019-12-10 Thread SeongJae Park
ter description, (suggested by Maximilian Heyne) - Change default aggressive shrinking duration from 1ms to 10ms - Merge two patches into one single patch SeongJae Park (2): xenbus/backend: Add memory pressure handler callback xen/blkback: Squeeze page pools if a memory pressure is detec

[Xen-devel] [PATCH v6 2/3] xen/blkback: Squeeze page pools if a memory pressure is detected

2019-12-10 Thread SeongJae Park
device. On systems using fast block devices such as ramdisks or NVMe SSDs, the results could be very different. If you are in such cases, you should control the squeezing duration via the module parameter. Reviewed-by: Juergen Gross Signed-off-by: SeongJae Park --- drivers/block/xen-blkback/blk

[Xen-devel] [PATCH v6 3/3] xen/blkback: Remove unnecessary static variable name prefixes

2019-12-10 Thread SeongJae Park
A few of static variables in blkback have 'xen_blkif_' prefix, though it is unnecessary for static variables. This commit removes such prefixes. Signed-off-by: SeongJae Park --- drivers/block/xen-blkback/blkback.c | 37 + 1 file changed, 17 insertions(+), 20

[Xen-devel] [PATCH v6 1/3] xenbus/backend: Add memory pressure handler callback

2019-12-10 Thread SeongJae Park
, but general resources. Nevertheless, this version of the implementation defers such sophisticated goals as a future work. Reviewed-by: Juergen Gross Signed-off-by: SeongJae Park --- drivers/xen/xenbus/xenbus_probe_backend.c | 32 +++ include/xen/xenbus.h

[Xen-devel] [PATCH v9 4/4] xen/blkback: Consistently insert one empty line between functions

2019-12-13 Thread SeongJae Park
The number of empty lines between functions in the xenbus.c is inconsistent. This trivial style cleanup commit fixes the file to consistently place only one empty line. Signed-off-by: SeongJae Park --- drivers/block/xen-blkback/xenbus.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions

[Xen-devel] [PATCH v9 1/4] xenbus/backend: Add memory pressure handler callback

2019-12-13 Thread SeongJae Park
, but general resources. Nevertheless, this version of the implementation defers such sophisticated goals as a future work. Reviewed-by: Juergen Gross Reviewed-by: Roger Pau Monné Signed-off-by: SeongJae Park --- drivers/xen/xenbus/xenbus_probe_backend.c | 32 +++ include/xen

[Xen-devel] [PATCH v9 3/4] xen/blkback: Remove unnecessary static variable name prefixes

2019-12-13 Thread SeongJae Park
A few of static variables in blkback have 'xen_blkif_' prefix, though it is unnecessary for static variables. This commit removes such prefixes. Reviewed-by: Roger Pau Monné Signed-off-by: SeongJae Park --- drivers/block/xen-blkback/blkback.c | 37 + 1 file changed

[Xen-devel] [PATCH v9 2/4] xen/blkback: Squeeze page pools if a memory pressure is detected

2019-12-13 Thread SeongJae Park
the optimal squeezing duration for you. [1] https://aws.amazon.com/ebs/ [2] https://www.kernel.org/doc/html/latest/admin-guide/blockdev/ramdisk.html Signed-off-by: SeongJae Park --- .../ABI/testing/sysfs-driver-xen-blkback | 10 + drivers/block/xen-blkback/blkback.c | 7

[Xen-devel] [PATCH v9 0/4] xenbus/backend: Add a memory pressure handler callback

2019-12-13 Thread SeongJae Park
-by: Juergen' from the second patch (suggested by Roger Pau Monné) - Update contact of the new module param to SeongJae Park (suggested by Roger Pau Monné) - Wordsmith the description of the parameter (suggested by Roger Pau Monné) - Fix dumb bugs (suggested by Roger Pau Monné) - Move

Re: [Xen-devel] [PATCH v8 2/3] xen/blkback: Squeeze page pools if a memory pressure is detected

2019-12-13 Thread SeongJae Park
-- > > > > max_pgs Min Max Median AvgStddev > > 0 417 423 420419.4 2.5099801 > > 1024 414 425 416417.8 4.4384682 > > No difference proven at 95.0% confidence > >

[Xen-devel] [PATCH v8 1/3] xenbus/backend: Add memory pressure handler callback

2019-12-13 Thread SeongJae Park
, but general resources. Nevertheless, this version of the implementation defers such sophisticated goals as a future work. Reviewed-by: Juergen Gross Reviewed-by: Roger Pau Monné Signed-off-by: SeongJae Park --- drivers/xen/xenbus/xenbus_probe_backend.c | 32 +++ include/xen

[Xen-devel] [PATCH v8 2/3] xen/blkback: Squeeze page pools if a memory pressure is detected

2019-12-13 Thread SeongJae Park
the optimal squeezing duration for you. [1] https://aws.amazon.com/ebs/ [2] https://www.kernel.org/doc/html/latest/admin-guide/blockdev/ramdisk.html Reviewed-by: Juergen Gross Signed-off-by: SeongJae Park --- .../ABI/testing/sysfs-driver-xen-blkback | 9 drivers/block/xen-blkback

[Xen-devel] [PATCH v8 3/3] xen/blkback: Remove unnecessary static variable name prefixes

2019-12-13 Thread SeongJae Park
A few of static variables in blkback have 'xen_blkif_' prefix, though it is unnecessary for static variables. This commit removes such prefixes. Reviewed-by: Roger Pau Monné Signed-off-by: SeongJae Park --- drivers/block/xen-blkback/blkback.c | 37 + 1 file changed

Re: [Xen-devel] [PATCH v7 2/3] xen/blkback: Squeeze page pools if a memory pressure is detected

2019-12-13 Thread SeongJae Park
On Fri, Dec 13, 2019 at 10:33 AM Jürgen Groß wrote: > > On 13.12.19 10:27, Roger Pau Monné wrote: > > On Thu, Dec 12, 2019 at 05:06:58PM +0100, SeongJae Park wrote: > >> On Thu, 12 Dec 2019 16:27:57 +0100 "Roger Pau Monné" > >> wrote: > >> > &

Re: [Xen-devel] [PATCH v10 2/4] xen/blkback: Squeeze page pools if a memory pressure is detected

2019-12-17 Thread SeongJae Park
On Tue, 17 Dec 2019 07:23:12 +0100 "Jürgen Groß" wrote: > On 16.12.19 20:48, SeongJae Park wrote: > > On on, 16 Dec 2019 17:23:44 +0100, Jürgen Groß wrote: > > > >> On 16.12.19 17:15, SeongJae Park wrote: > >>> On Mon, 16 Dec 2019 15:37:20 +0100 Se

Re: [Xen-devel] [PATCH v10 2/4] xen/blkback: Squeeze page pools if a memory pressure is detected

2019-12-17 Thread SeongJae Park
On Tue, 17 Dec 2019 12:39:15 +0100 "Roger Pau Monné" wrote: > On Mon, Dec 16, 2019 at 08:48:03PM +0100, SeongJae Park wrote: > > On on, 16 Dec 2019 17:23:44 +0100, Jürgen Groß wrote: > > > > > On 16.12.19 17:15, SeongJae Park wrote: > > > > On

Re: [Xen-devel] [PATCH v10 2/4] xen/blkback: Squeeze page pools if a memory pressure is detected

2019-12-17 Thread SeongJae Park
On Tue, 17 Dec 2019 09:16:47 +0100 "Jürgen Groß" wrote: > On 17.12.19 08:59, SeongJae Park wrote: > > On Tue, 17 Dec 2019 07:23:12 +0100 "Jürgen Groß" wrote: > > > >> On 16.12.19 20:48, SeongJae Park wrote: > >>> On on, 16 Dec 2019 17:23:

[Xen-devel] [PATCH v11 6/6] xen/blkback: Consistently insert one empty line between functions

2019-12-17 Thread SeongJae Park
From: SeongJae Park The number of empty lines between functions in the xenbus.c is inconsistent. This trivial style cleanup commit fixes the file to consistently place only one empty line. Acked-by: Roger Pau Monné Signed-off-by: SeongJae Park --- drivers/block/xen-blkback/xenbus.c | 7

Re: [Xen-devel] [PATCH v11 2/6] xenbus/backend: Protect xenbus callback with lock

2019-12-17 Thread SeongJae Park
On Tue, 17 Dec 2019 17:13:42 +0100 "Jürgen Groß" wrote: > On 17.12.19 17:07, SeongJae Park wrote: > > From: SeongJae Park > > > > 'reclaim_memory' callback can race with a driver code as this callback > > will be called from any memory pressure detecte

[Xen-devel] [PATCH 1/3] xen/blkback: Squeeze page pools if a memory pressure is detected

2019-12-17 Thread SeongJae Park
From: SeongJae Park I though it would be better to review separated patches, but seems it was my mistake. As Juergen asked, merged them again and post here. Also, dropped Roger's reviewed-by. Thanks, SeongJae Park &g

[Xen-devel] [PATCH v11 1/6] xenbus/backend: Add memory pressure handler callback

2019-12-17 Thread SeongJae Park
From: SeongJae Park Granting pages consumes backend system memory. In systems configured with insufficient spare memory for those pages, it can cause a memory pressure situation. However, finding the optimal amount of the spare memory is challenging for large systems having dynamic resource

[Xen-devel] [PATCH v11 0/6] xenbus/backend: Add a memory pressure handler callback

2019-12-17 Thread SeongJae Park
://lore.kernel.org/xen-devel/20191213130211.24011-1-sjp...@amazon.de/) - Drop 'Reviewed-by: Juergen' from the second patch (suggested by Roger Pau Monné) - Update contact of the new module param to SeongJae Park (suggested by Roger Pau Monné) - Wordsmith the description of the parameter

[Xen-devel] [PATCH v11 3/6] xen/blkback: Squeeze page pools if a memory pressure is detected

2019-12-17 Thread SeongJae Park
From: SeongJae Park Each `blkif` has a free pages pool for the grant mapping. The size of the pool starts from zero and is increased on demand while processing the I/O requests. If current I/O requests handling is finished or 100 milliseconds has passed since last I/O requests handling

[Xen-devel] [PATCH v11 2/6] xenbus/backend: Protect xenbus callback with lock

2019-12-17 Thread SeongJae Park
From: SeongJae Park 'reclaim_memory' callback can race with a driver code as this callback will be called from any memory pressure detected context. To deal with the case, this commit adds a spinlock in the 'xenbus_device'. Whenever 'reclaim_memory' callback is called, the lock of the device

[Xen-devel] [PATCH v11 4/6] xen/blkback: Protect 'reclaim_memory()' with 'reclaim_lock'

2019-12-17 Thread SeongJae Park
From: SeongJae Park The 'reclaim_memory()' callback of blkback could race with 'xen_blkbk_probe()' and 'xen_blkbk_remove()'. In the case, incompletely linked 'backend_info' and 'blkif' might be exposed to the callback, thus result in bad results including NULL dereference. This commit fixes

Re: [Xen-devel] [PATCH v10 2/4] xen/blkback: Squeeze page pools if a memory pressure is detected

2019-12-17 Thread SeongJae Park
On Tue, 17 Dec 2019 09:30:32 +0100 SeongJae Park wrote: > On Tue, 17 Dec 2019 09:16:47 +0100 "Jürgen Groß" wrote: > > > On 17.12.19 08:59, SeongJae Park wrote: > > > On Tue, 17 Dec 2019 07:23:12 +0100 "Jürgen Groß" wrote: > > > > > >

[Xen-devel] [PATCH v11 5/6] xen/blkback: Remove unnecessary static variable name prefixes

2019-12-17 Thread SeongJae Park
From: SeongJae Park A few of static variables in blkback have 'xen_blkif_' prefix, though it is unnecessary for static variables. This commit removes such prefixes. Reviewed-by: Roger Pau Monné Signed-off-by: SeongJae Park --- drivers/block/xen-blkback/blkback.c | 37

Re: [Xen-devel] [PATCH v11 2/6] xenbus/backend: Protect xenbus callback with lock

2019-12-17 Thread SeongJae Park
On Tue, 17 Dec 2019 18:10:19 +0100 "Jürgen Groß" wrote: > On 17.12.19 17:24, SeongJae Park wrote: > > On Tue, 17 Dec 2019 17:13:42 +0100 "Jürgen Groß" wrote: > > > >> On 17.12.19 17:07, SeongJae Park wrote: > >>> From: SeongJae Park >

Re: [Xen-devel] [PATCH v6 1/3] xenbus/backend: Add memory pressure handler callback

2019-12-11 Thread SeongJae Park
> > release requests to only devices which causing the pressure. Also, the > > callback could be extended to handle not only memory, but general > > resources. Nevertheless, this version of the implementation defers such > > sophisticated goals as a future work.

Re: [Xen-devel] [PATCH v5 1/2] xenbus/backend: Add memory pressure handler callback

2019-12-11 Thread SeongJae Park
gt; > mentioned, there could be many different opinions about its implementation > > detail. In my opinion, it could be also possible to simply add another > > callback for another resource type. That said, because currently we have an > > use case and an implementation for

Re: [Xen-devel] [PATCH v5 2/2] xen/blkback: Squeeze page pools if a memory pressure is detected

2019-12-11 Thread SeongJae Park
nd hence you should hold off > sending v6 until we get some kind of conclusion/agreement. Sorry, I was inpatient. > > On Wed, Dec 11, 2019 at 05:08:12AM +0100, SeongJae Park wrote: > > On Tue, 10 Dec 2019 12:04:32 +0100 "Roger Pau Monné" > > wrote: > > > >

Re: [Xen-devel] [PATCH v7 2/3] xen/blkback: Squeeze page pools if a memory pressure is detected

2019-12-12 Thread SeongJae Park
On Thu, 12 Dec 2019 12:42:47 +0100 "Roger Pau Monné" wrote: > > Please make sure you Cc me in blkback related patches. Sorry for forgotting you! I will never forget again. > > On Wed, Dec 11, 2019 at 06:10:15PM +, SeongJae Park wrote: > > Each `

Re: [Xen-devel] [PATCH v7 2/3] xen/blkback: Squeeze page pools if a memory pressure is detected

2019-12-12 Thread SeongJae Park
} else { + if (unlikely(buffer_squeeze_end)) + buffer_squeeze_end = 0; shrink_free_pagepool(ring, max_buffer_pages); + } if (log_stats && time_after(jiffies, ring->st_print))

Re: [Xen-devel] [PATCH v7 2/3] xen/blkback: Squeeze page pools if a memory pressure is detected

2019-12-12 Thread SeongJae Park
al > from a performance PoV I would rather see it go away than adding more > stuff to it in order to workaround corner cases like memory > starvation. Right, if the cache is really giving no benefit, it would be much better to simply remove it. However, as mentioned before, I'm not sure whether it is useless at all. Maybe we could do some more detailed test to know that, but it would be an out of scope of this patch. > > Anyway, I guess we can take such change, but long term we need to look > into fixing grants to not use ballooned pages, and figure out if the > blkback free page cache is really useful or not. Totally agreed. Thanks, SeongJae Park > > Thanks, Roger. > ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

[Xen-devel] [PATCH v7 0/2] xenbus/backend: Add a memory pressure handler callback

2019-12-11 Thread SeongJae Park
aul Durrant) - Specify time unit of the duration in the parameter description, (suggested by Maximilian Heyne) - Change default aggressive shrinking duration from 1ms to 10ms - Merge two patches into one single patch SeongJae Park (2): xenbus/backend: Add memory pressure handler callback

[Xen-devel] [PATCH v7 1/3] xenbus/backend: Add memory pressure handler callback

2019-12-11 Thread SeongJae Park
, but general resources. Nevertheless, this version of the implementation defers such sophisticated goals as a future work. Reviewed-by: Juergen Gross Signed-off-by: SeongJae Park --- drivers/xen/xenbus/xenbus_probe_backend.c | 32 +++ include/xen/xenbus.h

[Xen-devel] [PATCH v7 2/3] xen/blkback: Squeeze page pools if a memory pressure is detected

2019-12-11 Thread SeongJae Park
the optimal squeezing duration for you. [1] https://aws.amazon.com/ebs/ [2] https://www.kernel.org/doc/html/latest/admin-guide/blockdev/ramdisk.html Reviewed-by: Juergen Gross Signed-off-by: SeongJae Park --- drivers/block/xen-blkback/blkback.c | 22 -- drivers/block/xen

[Xen-devel] [PATCH v7 3/3] xen/blkback: Remove unnecessary static variable name prefixes

2019-12-11 Thread SeongJae Park
A few of static variables in blkback have 'xen_blkif_' prefix, though it is unnecessary for static variables. This commit removes such prefixes. Reviewed-by: Roger Pau Monné Signed-off-by: SeongJae Park --- drivers/block/xen-blkback/blkback.c | 37 + 1 file changed

Re: [Xen-devel] [PATCH v9 2/4] xen/blkback: Squeeze page pools if a memory pressure is detected

2019-12-16 Thread SeongJae Park
On Mon, 16 Dec 2019 10:37:55 +0100 "Roger Pau Monné" wrote: > On Fri, Dec 13, 2019 at 03:35:44PM +0000, SeongJae Park wrote: > > Each `blkif` has a free pages pool for the grant mapping. The size of > > the pool starts from zero and is increased on demand while proces

[Xen-devel] [PATCH v10 4/4] xen/blkback: Consistently insert one empty line between functions

2019-12-16 Thread SeongJae Park
From: SeongJae Park The number of empty lines between functions in the xenbus.c is inconsistent. This trivial style cleanup commit fixes the file to consistently place only one empty line. Acked-by: Roger Pau Monné Signed-off-by: SeongJae Park --- drivers/block/xen-blkback/xenbus.c | 7

[Xen-devel] [PATCH v10 2/4] xen/blkback: Squeeze page pools if a memory pressure is detected

2019-12-16 Thread SeongJae Park
From: SeongJae Park Each `blkif` has a free pages pool for the grant mapping. The size of the pool starts from zero and is increased on demand while processing the I/O requests. If current I/O requests handling is finished or 100 milliseconds has passed since last I/O requests handling

[Xen-devel] [PATCH v10 1/4] xenbus/backend: Add memory pressure handler callback

2019-12-16 Thread SeongJae Park
From: SeongJae Park Granting pages consumes backend system memory. In systems configured with insufficient spare memory for those pages, it can cause a memory pressure situation. However, finding the optimal amount of the spare memory is challenging for large systems having dynamic resource

[Xen-devel] [PATCH v10 0/4] xenbus/backend: Add a memory pressure handler callback

2019-12-16 Thread SeongJae Park
module param to SeongJae Park (suggested by Roger Pau Monné) - Wordsmith the description of the parameter (suggested by Roger Pau Monné) - Fix dumb bugs (suggested by Roger Pau Monné) - Move module param definition to xenbus.c and reduce the number of lines for this change

[Xen-devel] [PATCH v10 3/4] xen/blkback: Remove unnecessary static variable name prefixes

2019-12-16 Thread SeongJae Park
From: SeongJae Park A few of static variables in blkback have 'xen_blkif_' prefix, though it is unnecessary for static variables. This commit removes such prefixes. Reviewed-by: Roger Pau Monné Signed-off-by: SeongJae Park --- drivers/block/xen-blkback/blkback.c | 37

Re: [Xen-devel] [PATCH v10 2/4] xen/blkback: Squeeze page pools if a memory pressure is detected

2019-12-16 Thread SeongJae Park
On Mon, 16 Dec 2019 13:45:25 +0100 SeongJae Park wrote: > From: SeongJae Park > > Each `blkif` has a free pages pool for the grant mapping. The size of > the pool starts from zero and is increased on demand while processing > the I/O requests. If current I/O requests handl

Re: [Xen-devel] [PATCH v10 2/4] xen/blkback: Squeeze page pools if a memory pressure is detected

2019-12-16 Thread SeongJae Park
On Mon, 16 Dec 2019 15:37:20 +0100 SeongJae Park wrote: > On Mon, 16 Dec 2019 13:45:25 +0100 SeongJae Park wrote: > > > From: SeongJae Park > > [...] > > --- a/drivers/block/xen-blkback/xenbus.c > > +++ b/drivers/block/xen-blkback/xenbus.c > &

Re: [Xen-devel] [PATCH v10 2/4] xen/blkback: Squeeze page pools if a memory pressure is detected

2019-12-16 Thread SeongJae Park
On on, 16 Dec 2019 17:23:44 +0100, Jürgen Groß wrote: > On 16.12.19 17:15, SeongJae Park wrote: > > On Mon, 16 Dec 2019 15:37:20 +0100 SeongJae Park wrote: > > > >> On Mon, 16 Dec 2019 13:45:25 +0100 SeongJae Park wrote: > >> > >>> From: SeongJae Pa

[Xen-devel] [PATCH] xen/blkback: Avoid unmapping unmapped grant pages

2019-11-26 Thread SeongJae Park
From: SeongJae Park For each I/O request, blkback first maps the foreign pages for the request to its local pages. If an allocation of a local page for the mapping fails, it should unmap every mapping already made for the request. However, blkback's handling mechanism for the allocation

Re: [Xen-devel] [PATCH v12 2/5] xenbus/backend: Protect xenbus callback with lock

2019-12-18 Thread SeongJae Park
On Wed, 18 Dec 2019 13:27:37 +0100 "Jürgen Groß" wrote: > On 18.12.19 11:42, SeongJae Park wrote: > > From: SeongJae Park > > > > 'reclaim_memory' callback can race with a driver code as this callback > > will be called from any memory pressure detecte

[Xen-devel] [PATCH v12 1/5] xenbus/backend: Add memory pressure handler callback

2019-12-18 Thread SeongJae Park
From: SeongJae Park Granting pages consumes backend system memory. In systems configured with insufficient spare memory for those pages, it can cause a memory pressure situation. However, finding the optimal amount of the spare memory is challenging for large systems having dynamic resource

[Xen-devel] [PATCH v12 0/5] xenbus/backend: Add memory pressure handler callback

2019-12-18 Thread SeongJae Park
of the new module param to SeongJae Park (suggested by Roger Pau Monné) - Wordsmith the description of the parameter (suggested by Roger Pau Monné) - Fix dumb bugs (suggested by Roger Pau Monné) - Move module param definition to xenbus.c and reduce the number of lines for this change

[Xen-devel] [PATCH v12 2/5] xenbus/backend: Protect xenbus callback with lock

2019-12-18 Thread SeongJae Park
From: SeongJae Park 'reclaim_memory' callback can race with a driver code as this callback will be called from any memory pressure detected context. To deal with the case, this commit adds a spinlock in the 'xenbus_device'. Whenever 'reclaim_memory' callback is called, the lock of the device

[Xen-devel] [PATCH v12 3/5] xen/blkback: Squeeze page pools if a memory pressure is detected

2019-12-18 Thread SeongJae Park
From: SeongJae Park Each `blkif` has a free pages pool for the grant mapping. The size of the pool starts from zero and is increased on demand while processing the I/O requests. If current I/O requests handling is finished or 100 milliseconds has passed since last I/O requests handling

[Xen-devel] [PATCH v12 5/5] xen/blkback: Consistently insert one empty line between functions

2019-12-18 Thread SeongJae Park
From: SeongJae Park The number of empty lines between functions in the xenbus.c is inconsistent. This trivial style cleanup commit fixes the file to consistently place only one empty line. Acked-by: Roger Pau Monné Signed-off-by: SeongJae Park --- drivers/block/xen-blkback/xenbus.c | 7

[Xen-devel] [PATCH v12 4/5] xen/blkback: Remove unnecessary static variable name prefixes

2019-12-18 Thread SeongJae Park
From: SeongJae Park A few of static variables in blkback have 'xen_blkif_' prefix, though it is unnecessary for static variables. This commit removes such prefixes. Reviewed-by: Roger Pau Monné Signed-off-by: SeongJae Park --- drivers/block/xen-blkback/blkback.c | 37

Re: [Xen-devel] [PATCH v12 2/5] xenbus/backend: Protect xenbus callback with lock

2019-12-18 Thread SeongJae Park
On Wed, 18 Dec 2019 14:30:44 +0100 "Jürgen Groß" wrote: > On 18.12.19 13:42, SeongJae Park wrote: > > On Wed, 18 Dec 2019 13:27:37 +0100 "Jürgen Groß" wrote: > > > >> On 18.12.19 11:42, SeongJae Park wrote: > >>> From: SeongJae Park >

[Xen-devel] [PATCH v13 2/5] xenbus/backend: Protect xenbus callback with lock

2019-12-18 Thread SeongJae Park
From: SeongJae Park A driver's 'reclaim_memory' callback can race with 'probe' or 'remove' because it will be called whenever memory pressure is detected. To avoid such race, this commit embeds a spinlock in each 'xenbus_device' and make 'xenbus' to hold the lock while the corresponded

[Xen-devel] [PATCH v13 0/5] xenbus/backend: Add memory pressure handler callback

2019-12-18 Thread SeongJae Park
of the 2nd path Changes from v8 (https://lore.kernel.org/xen-devel/20191213130211.24011-1-sjp...@amazon.de/) - Drop 'Reviewed-by: Juergen' from the second patch (suggested by Roger Pau Monné) - Update contact of the new module param to SeongJae Park (suggested by Roger Pau Monné) - Wordsmith

[Xen-devel] [PATCH v13 1/5] xenbus/backend: Add memory pressure handler callback

2019-12-18 Thread SeongJae Park
From: SeongJae Park Granting pages consumes backend system memory. In systems configured with insufficient spare memory for those pages, it can cause a memory pressure situation. However, finding the optimal amount of the spare memory is challenging for large systems having dynamic resource

[Xen-devel] [PATCH v13 4/5] xen/blkback: Remove unnecessary static variable name prefixes

2019-12-18 Thread SeongJae Park
From: SeongJae Park A few of static variables in blkback have 'xen_blkif_' prefix, though it is unnecessary for static variables. This commit removes such prefixes. Reviewed-by: Roger Pau Monné Signed-off-by: SeongJae Park --- drivers/block/xen-blkback/blkback.c | 37

[Xen-devel] [PATCH v13 3/5] xen/blkback: Squeeze page pools if a memory pressure is detected

2019-12-18 Thread SeongJae Park
From: SeongJae Park Each `blkif` has a free pages pool for the grant mapping. The size of the pool starts from zero and is increased on demand while processing the I/O requests. If current I/O requests handling is finished or 100 milliseconds has passed since last I/O requests handling

[Xen-devel] [PATCH v13 4/5] xen/blkback: Remove unnecessary static variable name prefixes

2019-12-18 Thread SeongJae Park
From: SeongJae Park A few of static variables in blkback have 'xen_blkif_' prefix, though it is unnecessary for static variables. This commit removes such prefixes. Reviewed-by: Roger Pau Monné Signed-off-by: SeongJae Park --- drivers/block/xen-blkback/blkback.c | 37

Re: [Xen-devel] [PATCH v12 2/5] xenbus/backend: Protect xenbus callback with lock

2019-12-18 Thread SeongJae Park
On Wed, 18 Dec 2019 16:11:51 +0100 "Jürgen Groß" wrote: > On 18.12.19 15:40, SeongJae Park wrote: > > On Wed, 18 Dec 2019 14:30:44 +0100 "Jürgen Groß" wrote: > > > >> On 18.12.19 13:42, SeongJae Park wrote: > >>> On Wed, 18 Dec 2019 13:27

[Xen-devel] [PATCH v13 5/5] xen/blkback: Consistently insert one empty line between functions

2019-12-18 Thread SeongJae Park
From: SeongJae Park The number of empty lines between functions in the xenbus.c is inconsistent. This trivial style cleanup commit fixes the file to consistently place only one empty line. Acked-by: Roger Pau Monné Signed-off-by: SeongJae Park --- drivers/block/xen-blkback/xenbus.c | 7

Re: [Xen-devel] [PATCH v4 1/2] xenbus/backend: Add memory pressure handler callback

2019-12-09 Thread SeongJae Park
On Tue, Dec 10, 2019 at 7:11 AM Jürgen Groß wrote: > > On 09.12.19 20:43, SeongJae Park wrote: > > From: SeongJae Park > > > > Granting pages consumes backend system memory. In systems configured > > with insufficient spare memory for those pages, it can cause a

Re: [Xen-devel] [PATCH v4 1/2] xenbus/backend: Add memory pressure handler callback

2019-12-09 Thread SeongJae Park
On Tue, Dec 10, 2019 at 7:23 AM Jürgen Groß wrote: > > On 09.12.19 20:43, SeongJae Park wrote: > > From: SeongJae Park > > > > Granting pages consumes backend system memory. In systems configured > > with insufficient spare memory for those pages, it can cause a

[Xen-devel] [PATCH v5 2/2] xen/blkback: Squeeze page pools if a memory pressure is detected

2019-12-10 Thread SeongJae Park
atency. Nevertheless, pleaset note that this is just a very simple and minimal test. Reviewed-by: Juergen Gross Signed-off-by: SeongJae Park --- drivers/block/xen-blkback/blkback.c | 23 +-- drivers/block/xen-blkback/common.h | 1 + drivers/block/xen-blkback/xenbus.c | 3

[Xen-devel] [PATCH v5 1/2] xenbus/backend: Add memory pressure handler callback

2019-12-10 Thread SeongJae Park
focuses on memory only. However, it would be ablt to be extended for general resources. Signed-off-by: SeongJae Park --- drivers/xen/xenbus/xenbus_probe_backend.c | 31 +++ include/xen/xenbus.h | 1 + 2 files changed, 32 insertions(+) diff --git a/drivers/xen

[Xen-devel] [PATCH v5 0/2] xenbus/backend: Add a memory pressure handler callback

2019-12-10 Thread SeongJae Park
ion in the parameter description, (suggested by Maximilian Heyne) - Change default aggressive shrinking duration from 1ms to 10ms - Merge two patches into one single patch SeongJae Park (2): xenbus/backend: Add memory pressure handler callback xen/blkback: Squeeze page pools if a memory press

Re: [Xen-devel] [PATCH v13 0/5] xenbus/backend: Add memory pressure handler callback

2020-01-13 Thread SeongJae Park
Every patch of this patchset got at least one 'Reviewed-by' or 'Acked-by' from appropriate maintainers by last Wednesday, and after that, got no comment yet. May I ask some more comments? Thanks, SeongJae Park On Wed, 18 Dec 2019 19:37:13 +0100 SeongJae Park wrote: > Granting pages consu

Re: [Xen-devel] [PATCH v13 0/5] xenbus/backend: Add memory pressure handler callback

2020-01-13 Thread SeongJae Park
On Mon, 13 Jan 2020 10:55:07 +0100 "Roger Pau Monné" wrote: > On Mon, Jan 13, 2020 at 10:49:52AM +0100, SeongJae Park wrote: > > Every patch of this patchset got at least one 'Reviewed-by' or 'Acked-by' > > from > > appropriate maintainers by last Wednesday,

Re: [Xen-devel] [PATCH v13 3/5] xen/blkback: Squeeze page pools if a memory pressure is detected

2020-01-02 Thread SeongJae Park
Hello Roger, Sorry if I'm disturbing your vacation. If you are already came back to work, may I ask your opinion about this patch? On Wed, 18 Dec 2019 19:37:16 +0100 SeongJae Park wrote: > From: SeongJae Park > > Each `blkif` has a free pages pool for the grant mapping.

Re: [PATCH 1/2] xen/blkback: turn the cache purge LRU interval into a parameter

2020-10-15 Thread SeongJae Park
nsient issue. > > Signed-off-by: Roger Pau Monné > --- > Cc: Konrad Rzeszutek Wilk > Cc: Jens Axboe > Cc: Boris Ostrovsky > Cc: SeongJae Park > Cc: xen-devel@lists.xenproject.org > Cc: linux-bl...@vger.kernel.org > Cc: J. Roeleveld > Cc: Jürgen Groß > -

Re: [PATCH v2 1/3] xen-blkback: add a parameter for disabling of persistent grants

2020-09-22 Thread SeongJae Park
On Tue, 22 Sep 2020 13:35:11 +0200 "Roger Pau Monné" wrote: > On Tue, Sep 22, 2020 at 01:26:38PM +0200, SeongJae Park wrote: > > On Tue, 22 Sep 2020 13:12:59 +0200 "Roger Pau Monné" > > wrote: > > > > > On Tue, Sep 22, 2020 at 12:52:07PM

Re: [PATCH v2 1/3] xen-blkback: add a parameter for disabling of persistent grants

2020-09-22 Thread SeongJae Park
On Tue, 22 Sep 2020 13:35:30 +0200 "Jürgen Groß" wrote: > On 22.09.20 13:26, SeongJae Park wrote: > > On Tue, 22 Sep 2020 13:12:59 +0200 "Roger Pau Monné" > > wrote: > > > >> On Tue, Sep 22, 2020 at 12:52:07PM +0200, SeongJae Park wrote:

Re: [PATCH] xen-blkback: add a parameter for disabling of persistent grants

2020-09-24 Thread SeongJae Park
On Wed, 23 Sep 2020 16:09:30 -0400 Konrad Rzeszutek Wilk wrote: > On Tue, Sep 22, 2020 at 09:01:25AM +0200, SeongJae Park wrote: > > From: SeongJae Park > > > > Persistent grants feature provides high scalability. On some small > > systems, however, it could

Re: [PATCH v2 2/3] xen-blkfront: add a parameter for disabling of persistent grants

2020-09-22 Thread SeongJae Park
On Tue, 22 Sep 2020 14:11:32 +0200 "Jürgen Groß" wrote: > On 22.09.20 12:52, SeongJae Park wrote: > > From: SeongJae Park > > > > Persistent grants feature provides high scalability. On some small > > systems, however, it could incur data copy ove

[PATCH v2 1/3] xen-blkback: add a parameter for disabling of persistent grants

2020-09-22 Thread SeongJae Park
From: SeongJae Park Persistent grants feature provides high scalability. On some small systems, however, it could incur data copy overheads[1] and thus it is required to be disabled. But, there is no option to disable it. For the reason, this commit adds a module parameter for disabling

[PATCH v2 3/3] xen-blkfront: Apply changed parameter name to the document

2020-09-22 Thread SeongJae Park
From: SeongJae Park Commit 14e710fe7897 ("xen-blkfront: rename indirect descriptor parameter") changed the name of the module parameter for the maximum amount of segments in indirect requests but missed updating the document. This commit updates the document. Signed-off-by: Seo

[PATCH v2 0/3] xen-blk(back|front): Let users disable persistent grants

2020-09-22 Thread SeongJae Park
From: SeongJae Park Persistent grants feature provides high scalability. On some small systems, however, it could incur data copy overheads[1] and thus it is required to be disabled. But, there is no option to disable it. For the reason, this commit adds module parameters for disabling

Re: [PATCH v2 1/3] xen-blkback: add a parameter for disabling of persistent grants

2020-09-22 Thread SeongJae Park
On Tue, 22 Sep 2020 13:12:59 +0200 "Roger Pau Monné" wrote: > On Tue, Sep 22, 2020 at 12:52:07PM +0200, SeongJae Park wrote: > > From: SeongJae Park > > > > Persistent grants feature provides high scalability. On some small > > systems, however, it could

[PATCH v3 0/3] xen-blk(back|front): Let users disable persistent grants

2020-09-22 Thread SeongJae Park
From: SeongJae Park Persistent grants feature provides high scalability. On some small systems, however, it could incur data copy overheads[1] and thus it is required to be disabled. But, there is no option to disable it. For the reason, this commit adds module parameters for disabling

Re: [PATCH v3 3/3] xen-blkfront: Apply changed parameter name to the document

2020-09-22 Thread SeongJae Park
On Tue, 22 Sep 2020 16:44:25 +0200 "Roger Pau Monné" wrote: > On Tue, Sep 22, 2020 at 04:27:39PM +0200, Jürgen Groß wrote: > > On 22.09.20 16:15, SeongJae Park wrote: > > > From: SeongJae Park > > > > > > Commit 14e710fe7897 ("xen-blkfront: r

[PATCH v4 1/3] xen-blkback: add a parameter for disabling of persistent grants

2020-09-23 Thread SeongJae Park
From: SeongJae Park Persistent grants feature provides high scalability. On some small systems, however, it could incur data copy overheads[1] and thus it is required to be disabled. But, there is no option to disable it. For the reason, this commit adds a module parameter for disabling

[PATCH v4 3/3] xen-blkfront: Apply changed parameter name to the document

2020-09-23 Thread SeongJae Park
From: SeongJae Park Commit 14e710fe7897 ("xen-blkfront: rename indirect descriptor parameter") changed the name of the module parameter for the maximum amount of segments in indirect requests but missed updating the document. This commit updates the document. Signed-off-by: Seo

Re: [PATCH linux-next] drivers/xen/xenbus/xenbus_client.c: fix bugon.cocci warnings

2021-08-25 Thread SeongJae Park
From: SeongJae Park On Tue, 24 Aug 2021 23:24:51 -0700 CGEL wrote: > From: Jing Yangyang > > Use BUG_ON instead of a if condition followed by BUG. > > Generated by: scripts/coccinelle/misc/bugon.cocci > > Reported-by: Zeal Robot > Signed-off-by: Jing Yangyang Re

  1   2   >