* [PATCH] Change the total_dirty from SZ_256M to SZ_64M.
@ 2018-11-03 8:36 hmsjwzb
2018-11-03 9:01 ` Nikolay Borisov
0 siblings, 1 reply; 3+ messages in thread
From: hmsjwzb @ 2018-11-03 8:36 UTC (permalink / raw)
Cc: clm, hmsjwzb, Josef Bacik, David Sterba, Omar Sandoval,
Filipe Manana, linux-btrfs, linux-kernel
The SZ_256M will cause trouble in platform with less than 256M memory.
For example, a qemu virtual machine.
Signed-off-by: hmsjwzb <weizhefix@gmail.com>
---
fs/btrfs/tests/extent-io-tests.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/tests/extent-io-tests.c b/fs/btrfs/tests/extent-io-tests.c
index 9e0f4a01be14..cb23dce96a2d 100644
--- a/fs/btrfs/tests/extent-io-tests.c
+++ b/fs/btrfs/tests/extent-io-tests.c
@@ -62,7 +62,7 @@ static int test_find_delalloc(u32 sectorsize)
struct page *page;
struct page *locked_page = NULL;
unsigned long index = 0;
- u64 total_dirty = SZ_256M;
+ u64 total_dirty = SZ_64M;
u64 max_bytes = SZ_128M;
u64 start, end, test_start;
u64 found;
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Change the total_dirty from SZ_256M to SZ_64M.
2018-11-03 8:36 [PATCH] Change the total_dirty from SZ_256M to SZ_64M hmsjwzb
@ 2018-11-03 9:01 ` Nikolay Borisov
2018-11-03 9:17 ` Qu Wenruo
0 siblings, 1 reply; 3+ messages in thread
From: Nikolay Borisov @ 2018-11-03 9:01 UTC (permalink / raw)
To: hmsjwzb
Cc: clm, Josef Bacik, David Sterba, Omar Sandoval, Filipe Manana,
linux-btrfs, linux-kernel
On 3.11.18 г. 10:36 ч., hmsjwzb wrote:
> The SZ_256M will cause trouble in platform with less than 256M memory.
> For example, a qemu virtual machine.
>
> Signed-off-by: hmsjwzb <weizhefix@gmail.com>
If you have actually taken the care to understand the code in
test_find_delalloc you would have seen that total_dirty and max_bytes
are actually inter-dependent so you cannot really change total_bytes
without adjusting max_bytes as well. Otherwise tests will start breaking.
NACK on this (and likely any future postings of this) since the tests
are sized in a such a way so as to test design limits (such as the max
extent size which is 128MB)
> ---
> fs/btrfs/tests/extent-io-tests.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/tests/extent-io-tests.c b/fs/btrfs/tests/extent-io-tests.c
> index 9e0f4a01be14..cb23dce96a2d 100644
> --- a/fs/btrfs/tests/extent-io-tests.c
> +++ b/fs/btrfs/tests/extent-io-tests.c
> @@ -62,7 +62,7 @@ static int test_find_delalloc(u32 sectorsize)
> struct page *page;
> struct page *locked_page = NULL;
> unsigned long index = 0;
> - u64 total_dirty = SZ_256M;
> + u64 total_dirty = SZ_64M;
> u64 max_bytes = SZ_128M;
> u64 start, end, test_start;
> u64 found;
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Change the total_dirty from SZ_256M to SZ_64M.
2018-11-03 9:01 ` Nikolay Borisov
@ 2018-11-03 9:17 ` Qu Wenruo
0 siblings, 0 replies; 3+ messages in thread
From: Qu Wenruo @ 2018-11-03 9:17 UTC (permalink / raw)
To: Nikolay Borisov, hmsjwzb
Cc: clm, Josef Bacik, David Sterba, Omar Sandoval, Filipe Manana,
linux-btrfs, linux-kernel
On 2018/11/3 下午5:01, Nikolay Borisov wrote:
>
>
> On 3.11.18 г. 10:36 ч., hmsjwzb wrote:
>> The SZ_256M will cause trouble in platform with less than 256M memory.
>> For example, a qemu virtual machine.
>>
>> Signed-off-by: hmsjwzb <weizhefix@gmail.com>
>
> If you have actually taken the care to understand the code in
> test_find_delalloc you would have seen that total_dirty and max_bytes
> are actually inter-dependent so you cannot really change total_bytes
> without adjusting max_bytes as well. Otherwise tests will start breaking.
Nowadays even for VM, the memory size should start from 2G.
If this 256M is causing problem, one should really re-consider the
memory size of the VM.
Not to mention the magic number is two ensure we have at least 2 file
extents.
>
> NACK on this (and likely any future postings of this) since the tests
> are sized in a such a way so as to test design limits (such as the max
> extent size which is 128MB)
And we should add some comment about this.
Personally I prefer some comment with this and also use (2 *
BTRFS_MAX_EXTENT_SIZE) other than this intermediate number.
Thanks,
Qu
>
>
>> ---
>> fs/btrfs/tests/extent-io-tests.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/fs/btrfs/tests/extent-io-tests.c b/fs/btrfs/tests/extent-io-tests.c
>> index 9e0f4a01be14..cb23dce96a2d 100644
>> --- a/fs/btrfs/tests/extent-io-tests.c
>> +++ b/fs/btrfs/tests/extent-io-tests.c
>> @@ -62,7 +62,7 @@ static int test_find_delalloc(u32 sectorsize)
>> struct page *page;
>> struct page *locked_page = NULL;
>> unsigned long index = 0;
>> - u64 total_dirty = SZ_256M;
>> + u64 total_dirty = SZ_64M;
>> u64 max_bytes = SZ_128M;
>> u64 start, end, test_start;
>> u64 found;
>>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-11-03 9:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-03 8:36 [PATCH] Change the total_dirty from SZ_256M to SZ_64M hmsjwzb
2018-11-03 9:01 ` Nikolay Borisov
2018-11-03 9:17 ` Qu Wenruo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.