* [PATCH 0/9] @ 2017-04-14 21:06 kusumi.tomohiro 2017-04-14 21:06 ` [PATCH 1/9] Fix num2str() output when modulo != -1U kusumi.tomohiro ` (9 more replies) 0 siblings, 10 replies; 19+ messages in thread From: kusumi.tomohiro @ 2017-04-14 21:06 UTC (permalink / raw) To: axboe, fio; +Cc: Tomohiro Kusumi From: Tomohiro Kusumi <tkusumi@tuxera.com> "Fix num2str() output when modulo != -1U" is a resend of below, which I believe has been neither acked nor nacked. http://www.spinics.net/lists/fio/msg05719.html The patch is the same, but added a link to below comment to the commit message. http://www.spinics.net/lists/fio/msg05720.html All the rest are new ones. Tomohiro Kusumi (9): Fix num2str() output when modulo != -1U Drop the only local variable declaration within a for-loop (C99) Make lib/strntol.c a stand-alone library Make lib/pattern.c a stand-alone library Make lib/rand.c a stand-alone library Make lib/zipf.c a stand-alone library Make lib/mountcheck.c a stand-alone library Make oslib/strlcat.c a stand-alone library Make oslib/linux-dev-lookup.c a stand-alone library lib/mountcheck.c | 2 +- lib/num2str.c | 34 +++++++++++++++++++++------------- lib/pattern.c | 9 ++++++++- lib/rand.c | 2 +- lib/strntol.c | 2 +- lib/zipf.c | 1 - oslib/linux-dev-lookup.c | 3 +-- oslib/strlcat.c | 2 +- parse.c | 3 ++- 9 files changed, 36 insertions(+), 22 deletions(-) -- 2.9.3 ^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 1/9] Fix num2str() output when modulo != -1U 2017-04-14 21:06 [PATCH 0/9] kusumi.tomohiro @ 2017-04-14 21:06 ` kusumi.tomohiro 2017-04-14 21:06 ` [PATCH 2/9] Drop the only local variable declaration within a for-loop (C99) kusumi.tomohiro ` (8 subsequent siblings) 9 siblings, 0 replies; 19+ messages in thread From: kusumi.tomohiro @ 2017-04-14 21:06 UTC (permalink / raw) To: axboe, fio; +Cc: Tomohiro Kusumi From: Tomohiro Kusumi <tkusumi@tuxera.com> I'm not sure what 05463816 actually fixed (as it only says "fix"), but this isn't properly working at least for some input numbers unless ".%s" part of sprintf() is meant to be something other than decimal part of the input number. This commit might be breaking something that 05463816 had fixed, which then needs to be rejected, but it at least prints decimal number as expected. For example, when 12345 is 12.0556640625 KiB, and 23456 is 22.90625 KiB, # python -c "print(12345.0 / 1024)" 12.0556640625 # python -c "print(23456.0 / 1024)" 22.90625 running this code as well as fio result in # cat ./test1.c #include <stdio.h> #include "lib/num2str.h" int main(void) { printf("%s-%s\n", num2str(12345, 4, 1, 1, N2S_BYTE), num2str(23456, 4, 1, 1, N2S_BYTE)); return 0; } # gcc -Wall -g -DCONFIG_STATIC_ASSERT ./test1.c ./lib/num2str.c below with the current implementation # ./a.out 12.6KiB-22.1KiB # ./fio --name=xxxxx --ioengine=sync --rw=read --size=1m --unlink=1 --bsrange=12345:23456 | grep "rw=read" xxxxx: (g=0): rw=read, bs=(R) 12.6KiB-22.1KiB, (W) 12.6KiB-22.1KiB, (T) 12.6KiB-22.1KiB, ioengine=sync, iodepth=1 whereas below with this commit. # ./a.out 12.1KiB-22.9KiB # ./fio --name=xxxxx --ioengine=sync --rw=read --size=1m --unlink=1 --bsrange=12345:23456 | grep "rw=read" xxxxx: (g=0): rw=read, bs=(R) 12.1KiB-22.9KiB, (W) 12.1KiB-22.9KiB, (T) 12.1KiB-22.9KiB, ioengine=sync, iodepth=1 -- Also see below http://www.spinics.net/lists/fio/msg05720.html > > + sprintf(fmt, "%%.%df", (int)(maxlen - strlen(tmp) - 1)); > > + sprintf(tmp, fmt, (double)modulo / (double)thousand[!!pow2]); > > I suspect one of the goals of that function was to restrict itself > to integer math and avoid invoking the floating point unit (which > might not even exist on some CPUs). -- These are some more verification with various parameters # cat ./testx.c #include <stdio.h> #include "lib/num2str.h" static void f(uint64_t n, int maxlen, int base, int pow2, int units) { printf("%10jd %s\n", n, num2str(n, maxlen, base, pow2, units)); } int main(void) { /* 1 */ f(1, 1, 1, 1, N2S_BYTE); f(1, 1, 1, 0, N2S_BYTE); printf("====================\n"); /* 10 */ f(10, 2, 1, 1, N2S_BYTE); f(10, 2, 1, 0, N2S_BYTE); printf("====================\n"); /* 1000 */ f(1000, 5, 1, 1, N2S_BYTE); f(1000, 5, 1, 0, N2S_BYTE); f(1000, 4, 1, 1, N2S_BYTE); f(1000, 4, 1, 0, N2S_BYTE); f(1000, 3, 1, 1, N2S_BYTE); f(1000, 3, 1, 0, N2S_BYTE); f(1000, 2, 1, 1, N2S_BYTE); f(1000, 2, 1, 0, N2S_BYTE); f(1000, 1, 1, 1, N2S_BYTE); f(1000, 1, 1, 0, N2S_BYTE); printf("====================\n"); /* 1024 */ f(1024, 5, 1, 1, N2S_BYTE); f(1024, 5, 1, 0, N2S_BYTE); f(1024, 4, 1, 1, N2S_BYTE); f(1024, 4, 1, 0, N2S_BYTE); f(1024, 3, 1, 1, N2S_BYTE); f(1024, 3, 1, 0, N2S_BYTE); f(1024, 2, 1, 1, N2S_BYTE); f(1024, 2, 1, 0, N2S_BYTE); f(1024, 1, 1, 1, N2S_BYTE); f(1024, 1, 1, 0, N2S_BYTE); printf("====================\n"); /* 12345 */ f(12345, 6, 1, 1, N2S_BYTE); f(12345, 6, 1, 0, N2S_BYTE); f(12345, 5, 1, 1, N2S_BYTE); f(12345, 5, 1, 0, N2S_BYTE); f(12345, 4, 1, 1, N2S_BYTE); f(12345, 4, 1, 0, N2S_BYTE); f(12345, 3, 1, 1, N2S_BYTE); f(12345, 3, 1, 0, N2S_BYTE); f(12345, 2, 1, 1, N2S_BYTE); f(12345, 2, 1, 0, N2S_BYTE); f(12345, 1, 1, 1, N2S_BYTE); f(12345, 1, 1, 0, N2S_BYTE); printf("====================\n"); /* 1234567 */ f(1234567, 8, 1, 1, N2S_BYTE); f(1234567, 8, 1, 0, N2S_BYTE); f(1234567, 7, 1, 1, N2S_BYTE); f(1234567, 7, 1, 0, N2S_BYTE); f(1234567, 6, 1, 1, N2S_BYTE); f(1234567, 6, 1, 0, N2S_BYTE); f(1234567, 5, 1, 1, N2S_BYTE); f(1234567, 5, 1, 0, N2S_BYTE); f(1234567, 4, 1, 1, N2S_BYTE); f(1234567, 4, 1, 0, N2S_BYTE); f(1234567, 3, 1, 1, N2S_BYTE); f(1234567, 3, 1, 0, N2S_BYTE); f(1234567, 2, 1, 1, N2S_BYTE); f(1234567, 2, 1, 0, N2S_BYTE); f(1234567, 1, 1, 1, N2S_BYTE); f(1234567, 1, 1, 0, N2S_BYTE); printf("====================\n"); /* 1234567 with base 1024 */ f(1234567, 8, 1024, 1, N2S_BYTE); f(1234567, 8, 1024, 0, N2S_BYTE); f(1234567, 7, 1024, 1, N2S_BYTE); f(1234567, 7, 1024, 0, N2S_BYTE); f(1234567, 6, 1024, 1, N2S_BYTE); f(1234567, 6, 1024, 0, N2S_BYTE); f(1234567, 5, 1024, 1, N2S_BYTE); f(1234567, 5, 1024, 0, N2S_BYTE); f(1234567, 4, 1024, 1, N2S_BYTE); f(1234567, 4, 1024, 0, N2S_BYTE); f(1234567, 3, 1024, 1, N2S_BYTE); f(1234567, 3, 1024, 0, N2S_BYTE); f(1234567, 2, 1024, 1, N2S_BYTE); f(1234567, 2, 1024, 0, N2S_BYTE); f(1234567, 1, 1024, 1, N2S_BYTE); f(1234567, 1, 1024, 0, N2S_BYTE); printf("====================\n"); /* 1234567 with base 1024 with N2S_BIT */ f(1234567, 9, 1024, 1, N2S_BIT); f(1234567, 9, 1024, 0, N2S_BIT); f(1234567, 8, 1024, 1, N2S_BIT); f(1234567, 8, 1024, 0, N2S_BIT); f(1234567, 7, 1024, 1, N2S_BIT); f(1234567, 7, 1024, 0, N2S_BIT); f(1234567, 6, 1024, 1, N2S_BIT); f(1234567, 6, 1024, 0, N2S_BIT); f(1234567, 5, 1024, 1, N2S_BIT); f(1234567, 5, 1024, 0, N2S_BIT); f(1234567, 4, 1024, 1, N2S_BIT); f(1234567, 4, 1024, 0, N2S_BIT); f(1234567, 3, 1024, 1, N2S_BIT); f(1234567, 3, 1024, 0, N2S_BIT); f(1234567, 2, 1024, 1, N2S_BIT); f(1234567, 2, 1024, 0, N2S_BIT); f(1234567, 1, 1024, 1, N2S_BIT); f(1234567, 1, 1024, 0, N2S_BIT); printf("====================\n"); return 0; } # gcc -Wall -g -DCONFIG_STATIC_ASSERT ./testx.c ./lib/num2str.c # ./a.out 1 1B 1 1B ==================== 10 10B 10 10B ==================== 1000 1000B 1000 1000B 1000 1000B 1000 1000B 1000 0.0KiB 1000 1.0kB 1000 1KiB 1000 1kB 1000 1KiB 1000 1kB ==================== 1024 1024B 1024 1024B 1024 1024B 1024 1024B 1024 1.0KiB 1024 1.0kB 1024 1KiB 1024 1kB 1024 1KiB 1024 1kB ==================== 12345 12345B 12345 12345B 12345 12345B 12345 12345B 12345 12.1KiB 12345 12.3kB 12345 12KiB 12345 12kB 12345 12KiB 12345 12kB 12345 0MiB 12345 0MB ==================== 1234567 1234567B 1234567 1234567B 1234567 1234567B 1234567 1234567B 1234567 1205.6KiB 1234567 1234.6kB 1234567 1206KiB 1234567 1235kB 1234567 1206KiB 1234567 1235kB 1234567 1.2MiB 1234567 1.2MB 1234567 1MiB 1234567 1MB 1234567 1MiB 1234567 1MB ==================== 1234567 1234567KiB 1234567 1234567kB 1234567 1234567KiB 1234567 1234567kB 1234567 1205.6MiB 1234567 1234.6MB 1234567 1206MiB 1234567 1235MB 1234567 1206MiB 1234567 1235MB 1234567 1.2GiB 1234567 1.2GB 1234567 1GiB 1234567 1GB 1234567 1GiB 1234567 1GB ==================== 1234567 9876536Kibit 1234567 9876536kbit 1234567 9876536Kibit 1234567 9876536kbit 1234567 9876536Kibit 1234567 9876536kbit 1234567 9645.1Mibit 1234567 9876.5Mbit 1234567 9645Mibit 1234567 9877Mbit 1234567 9645Mibit 1234567 9877Mbit 1234567 9.4Gibit 1234567 9.9Gbit 1234567 9Gibit 1234567 10Gbit 1234567 9Gibit 1234567 10Gbit ==================== Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com> --- lib/num2str.c | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/lib/num2str.c b/lib/num2str.c index 448d3ff..8d08841 100644 --- a/lib/num2str.c +++ b/lib/num2str.c @@ -10,7 +10,7 @@ /** * num2str() - Cheesy number->string conversion, complete with carry rounding error. * @num: quantity (e.g., number of blocks, bytes or bits) - * @maxlen: max number of digits in the output string (not counting prefix and units) + * @maxlen: max number of digits in the output string (not counting prefix and units, but counting .) * @base: multiplier for num (e.g., if num represents Ki, use 1024) * @pow2: select unit prefix - 0=power-of-10 decimal SI, nonzero=power-of-2 binary IEC * @units: select units - N2S_* macros defined in num2str.h @@ -23,9 +23,9 @@ char *num2str(uint64_t num, int maxlen, int base, int pow2, int units) const char **unitprefix; const char *unitstr[] = { "", "/s", "B", "bit", "B/s", "bit/s" }; const unsigned int thousand[] = { 1000, 1024 }; - unsigned int modulo, decimals; + unsigned int modulo; int unit_index = 0, post_index, carry = 0; - char tmp[32]; + char tmp[32], fmt[32]; char *buf; compiletime_assert(sizeof(sistr) == sizeof(iecstr), "unit prefix arrays must be identical sizes"); @@ -62,6 +62,9 @@ char *num2str(uint64_t num, int maxlen, int base, int pow2, int units) break; } + /* + * Divide by K/Ki until string length of num <= maxlen. + */ modulo = -1U; while (post_index < sizeof(sistr)) { sprintf(tmp, "%llu", (unsigned long long) num); @@ -74,6 +77,9 @@ char *num2str(uint64_t num, int maxlen, int base, int pow2, int units) post_index++; } + /* + * If no modulo, then we're done. + */ if (modulo == -1U) { done: if (post_index >= ARRAY_SIZE(sistr)) @@ -84,23 +90,25 @@ done: return buf; } + /* + * If no room for decimals, then we're done. + */ sprintf(tmp, "%llu", (unsigned long long) num); - decimals = maxlen - strlen(tmp); - if ((int)decimals <= 1) { + if ((int)(maxlen - strlen(tmp)) <= 1) { if (carry) num++; goto done; } - do { - sprintf(tmp, "%u", modulo); - if (strlen(tmp) <= decimals - 1) - break; - - modulo = (modulo + 9) / 10; - } while (1); + /* + * Fill in everything and return the result. + */ + assert(maxlen - strlen(tmp) - 1 > 0); + assert(modulo < thousand[!!pow2]); + sprintf(fmt, "%%.%df", (int)(maxlen - strlen(tmp) - 1)); + sprintf(tmp, fmt, (double)modulo / (double)thousand[!!pow2]); - sprintf(buf, "%llu.%u%s%s", (unsigned long long) num, modulo, + sprintf(buf, "%llu.%s%s%s", (unsigned long long) num, &tmp[2], unitprefix[post_index], unitstr[unit_index]); return buf; } -- 2.9.3 ^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 2/9] Drop the only local variable declaration within a for-loop (C99) 2017-04-14 21:06 [PATCH 0/9] kusumi.tomohiro 2017-04-14 21:06 ` [PATCH 1/9] Fix num2str() output when modulo != -1U kusumi.tomohiro @ 2017-04-14 21:06 ` kusumi.tomohiro 2017-04-14 21:06 ` [PATCH 3/9] Make lib/strntol.c a stand-alone library kusumi.tomohiro ` (7 subsequent siblings) 9 siblings, 0 replies; 19+ messages in thread From: kusumi.tomohiro @ 2017-04-14 21:06 UTC (permalink / raw) To: axboe, fio; +Cc: Tomohiro Kusumi From: Tomohiro Kusumi <tkusumi@tuxera.com> Nothing happens at least with gcc by default, but this is the only C99 (or after) specific declaration, so change it to normal style. Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com> --- parse.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/parse.c b/parse.c index fd5605f..4d4fddd 100644 --- a/parse.c +++ b/parse.c @@ -135,6 +135,7 @@ static unsigned long long get_mult_time(const char *str, int len, const char *p = str; char *c; unsigned long long mult = 1; + int i; /* * Go forward until we hit a non-digit, or +/- sign @@ -153,7 +154,7 @@ static unsigned long long get_mult_time(const char *str, int len, } c = strdup(p); - for (int i = 0; i < strlen(c); i++) + for (i = 0; i < strlen(c); i++) c[i] = tolower(c[i]); if (!strncmp("us", c, 2) || !strncmp("usec", c, 4)) -- 2.9.3 ^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 3/9] Make lib/strntol.c a stand-alone library 2017-04-14 21:06 [PATCH 0/9] kusumi.tomohiro 2017-04-14 21:06 ` [PATCH 1/9] Fix num2str() output when modulo != -1U kusumi.tomohiro 2017-04-14 21:06 ` [PATCH 2/9] Drop the only local variable declaration within a for-loop (C99) kusumi.tomohiro @ 2017-04-14 21:06 ` kusumi.tomohiro 2017-04-14 21:06 ` [PATCH 4/9] Make lib/pattern.c " kusumi.tomohiro ` (6 subsequent siblings) 9 siblings, 0 replies; 19+ messages in thread From: kusumi.tomohiro @ 2017-04-14 21:06 UTC (permalink / raw) To: axboe, fio; +Cc: Tomohiro Kusumi From: Tomohiro Kusumi <tkusumi@tuxera.com> It needs to include strntol.h from local directory where strntol.c is also located, to be able to use this as a stand-alone library, which is useful for debugging purpose. In fact, most of the files under lib/ directory do things this way. -- # cat ./test5.c #include <stdio.h> #include "lib/strntol.h" int main(void) { /* just to see if it compiles */ strntol(NULL, 0, NULL, 0); return 0; } # gcc -Wall -g ./test5.c ./lib/strntol.c Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com> --- lib/strntol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/strntol.c b/lib/strntol.c index adf45bd..f622c8d 100644 --- a/lib/strntol.c +++ b/lib/strntol.c @@ -2,7 +2,7 @@ #include <stdlib.h> #include <limits.h> -#include "lib/strntol.h" +#include "strntol.h" long strntol(const char *str, size_t sz, char **end, int base) { -- 2.9.3 ^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 4/9] Make lib/pattern.c a stand-alone library 2017-04-14 21:06 [PATCH 0/9] kusumi.tomohiro ` (2 preceding siblings ...) 2017-04-14 21:06 ` [PATCH 3/9] Make lib/strntol.c a stand-alone library kusumi.tomohiro @ 2017-04-14 21:06 ` kusumi.tomohiro 2017-04-14 21:06 ` [PATCH 5/9] Make lib/rand.c " kusumi.tomohiro ` (5 subsequent siblings) 9 siblings, 0 replies; 19+ messages in thread From: kusumi.tomohiro @ 2017-04-14 21:06 UTC (permalink / raw) To: axboe, fio; +Cc: Tomohiro Kusumi From: Tomohiro Kusumi <tkusumi@tuxera.com> lib/pattern.c not having dependency on fio.h enables it to be a stand-alone library, which is useful for debugging purpose. In fact, most of the files under lib/ directory do things this way. This requires the previous commit. -- # cat ./test6.c #include <stdio.h> #include "lib/pattern.h" int main(void) { /* just to see if it compiles */ paste_format_inplace(NULL, 0, NULL, 0, NULL); return 0; } # gcc -Wall -g ./test6.c ./lib/pattern.c ./lib/strntol.c Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com> --- lib/pattern.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/pattern.c b/lib/pattern.c index b8ae809..0aeb935 100644 --- a/lib/pattern.c +++ b/lib/pattern.c @@ -1,6 +1,13 @@ -#include "fio.h" +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <limits.h> +#include <errno.h> +#include <assert.h> + #include "strntol.h" #include "pattern.h" +#include "../minmax.h" #include "../oslib/strcasestr.h" /** -- 2.9.3 ^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 5/9] Make lib/rand.c a stand-alone library 2017-04-14 21:06 [PATCH 0/9] kusumi.tomohiro ` (3 preceding siblings ...) 2017-04-14 21:06 ` [PATCH 4/9] Make lib/pattern.c " kusumi.tomohiro @ 2017-04-14 21:06 ` kusumi.tomohiro 2017-04-14 21:06 ` [PATCH 6/9] Make lib/zipf.c " kusumi.tomohiro ` (4 subsequent siblings) 9 siblings, 0 replies; 19+ messages in thread From: kusumi.tomohiro @ 2017-04-14 21:06 UTC (permalink / raw) To: axboe, fio; +Cc: Tomohiro Kusumi From: Tomohiro Kusumi <tkusumi@tuxera.com> It needs to include pattern.h from local directory where rand.c is also located, to be able to use this as a stand-alone library, which is useful for debugging purpose. In fact, most of the files under lib/ directory do things this way. -- # cat ./test7.c #include <stdio.h> #include "lib/rand.h" int main(void) { /* just to see if it compiles */ init_rand(NULL, 0); return 0; } # gcc -Wall -g -DBITS_PER_LONG=64 ./test7.c ./lib/rand.c ./lib/pattern.c ./lib/strntol.c Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com> --- lib/rand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rand.c b/lib/rand.c index 9c3e0d6..3f60a67 100644 --- a/lib/rand.c +++ b/lib/rand.c @@ -36,7 +36,7 @@ #include <string.h> #include <assert.h> #include "rand.h" -#include "lib/pattern.h" +#include "pattern.h" #include "../hash.h" int arch_random; -- 2.9.3 ^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 6/9] Make lib/zipf.c a stand-alone library 2017-04-14 21:06 [PATCH 0/9] kusumi.tomohiro ` (4 preceding siblings ...) 2017-04-14 21:06 ` [PATCH 5/9] Make lib/rand.c " kusumi.tomohiro @ 2017-04-14 21:06 ` kusumi.tomohiro 2017-04-14 21:06 ` [PATCH 7/9] Make lib/mountcheck.c " kusumi.tomohiro ` (3 subsequent siblings) 9 siblings, 0 replies; 19+ messages in thread From: kusumi.tomohiro @ 2017-04-14 21:06 UTC (permalink / raw) To: axboe, fio; +Cc: Tomohiro Kusumi From: Tomohiro Kusumi <tkusumi@tuxera.com> lib/zipf.c not having dependency on fio header (log.h) enables it to be a stand-alone library, which is useful for debugging purpose. In fact, most of the files under lib/ directory do things this way. lib/zipf.c doesn't use log.h (log(3) is apparently from -lm). This requires the previous commit. -- # cat ./test8.c #include <stdio.h> #include "lib/zipf.h" int main(void) { /* just to see if it compiles */ zipf_init(NULL, 0, 0, 0); return 0; } # gcc -Wall -g -lm -DBITS_PER_LONG=64 ./test8.c ./lib/zipf.c ./lib/rand.c ./lib/pattern.c ./lib/strntol.c Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com> --- lib/zipf.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/zipf.c b/lib/zipf.c index 681df70..3d535c7 100644 --- a/lib/zipf.c +++ b/lib/zipf.c @@ -6,7 +6,6 @@ #include <sys/types.h> #include <fcntl.h> #include "ieee754.h" -#include "../log.h" #include "zipf.h" #include "../minmax.h" #include "../hash.h" -- 2.9.3 ^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 7/9] Make lib/mountcheck.c a stand-alone library 2017-04-14 21:06 [PATCH 0/9] kusumi.tomohiro ` (5 preceding siblings ...) 2017-04-14 21:06 ` [PATCH 6/9] Make lib/zipf.c " kusumi.tomohiro @ 2017-04-14 21:06 ` kusumi.tomohiro 2017-04-14 21:06 ` [PATCH 8/9] Make oslib/strlcat.c " kusumi.tomohiro ` (2 subsequent siblings) 9 siblings, 0 replies; 19+ messages in thread From: kusumi.tomohiro @ 2017-04-14 21:06 UTC (permalink / raw) To: axboe, fio; +Cc: Tomohiro Kusumi From: Tomohiro Kusumi <tkusumi@tuxera.com> It needs to include mountcheck.h from local directory where mountcheck.c is also located, to be able to use this as a stand-alone library, which is useful for debugging purpose. In fact, most of the files under lib/ directory do things this way. -- # cat ./test11.c #include <stdio.h> #include "lib/mountcheck.h" int main(int argc, char **argv) { printf("%d\n", device_is_mounted(argv[1])); return 0; } -- # uname Linux # gcc -Wall -g -DCONFIG_GETMNTENT ./test11.c ./lib/mountcheck.c # ./a.out /dev/sda1 1 -- # uname DragonFly # gcc -Wall -g -DCONFIG_GETMNTINFO ./test11.c ./lib/mountcheck.c # ./a.out /dev/da0s1a 1 -- # uname NetBSD # gcc -Wall -g -DCONFIG_GETMNTINFO_STATVFS ./test11.c ./lib/mountcheck.c # ./a.out /dev/sd0a 1 Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com> --- lib/mountcheck.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mountcheck.c b/lib/mountcheck.c index 0aec744..2fb6fe7 100644 --- a/lib/mountcheck.c +++ b/lib/mountcheck.c @@ -4,7 +4,7 @@ #ifdef CONFIG_GETMNTENT #include <mntent.h> -#include "lib/mountcheck.h" +#include "mountcheck.h" #define MTAB "/etc/mtab" -- 2.9.3 ^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 8/9] Make oslib/strlcat.c a stand-alone library 2017-04-14 21:06 [PATCH 0/9] kusumi.tomohiro ` (6 preceding siblings ...) 2017-04-14 21:06 ` [PATCH 7/9] Make lib/mountcheck.c " kusumi.tomohiro @ 2017-04-14 21:06 ` kusumi.tomohiro 2017-04-14 21:06 ` [PATCH 9/9] Make oslib/linux-dev-lookup.c " kusumi.tomohiro 2017-04-26 18:43 ` [PATCH 0/9] Jens Axboe 9 siblings, 0 replies; 19+ messages in thread From: kusumi.tomohiro @ 2017-04-14 21:06 UTC (permalink / raw) To: axboe, fio; +Cc: Tomohiro Kusumi From: Tomohiro Kusumi <tkusumi@tuxera.com> It needs to include strlcat.h from local directory where strlcat.c is also located, to be able to use this as a stand-alone library, which is useful for debugging purpose. In fact, most of the files under oslib/ directory do things this way. -- # cat ./test9.c #include <stdio.h> #include "oslib/strlcat.h" int main(void) { /* just to see if it compiles */ strlcat(NULL, NULL, 0); return 0; } # gcc -Wall -g ./test9.c ./oslib/strlcat.c Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com> --- oslib/strlcat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oslib/strlcat.c b/oslib/strlcat.c index 3329b83..3b33d0e 100644 --- a/oslib/strlcat.c +++ b/oslib/strlcat.c @@ -1,5 +1,5 @@ #include <string.h> -#include "oslib/strlcat.h" +#include "strlcat.h" size_t strlcat(char *dst, const char *src, size_t size) { -- 2.9.3 ^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 9/9] Make oslib/linux-dev-lookup.c a stand-alone library 2017-04-14 21:06 [PATCH 0/9] kusumi.tomohiro ` (7 preceding siblings ...) 2017-04-14 21:06 ` [PATCH 8/9] Make oslib/strlcat.c " kusumi.tomohiro @ 2017-04-14 21:06 ` kusumi.tomohiro 2017-04-26 18:43 ` [PATCH 0/9] Jens Axboe 9 siblings, 0 replies; 19+ messages in thread From: kusumi.tomohiro @ 2017-04-14 21:06 UTC (permalink / raw) To: axboe, fio; +Cc: Tomohiro Kusumi From: Tomohiro Kusumi <tkusumi@tuxera.com> It needs to include linux-dev-lookup.h from local directory where linux-dev-lookup.c is also located, to be able to use this as a stand-alone library, which is useful for debugging purpose. In fact, most of the files under oslib/ directory do things this way. It also doesn't need to include os/os.h as it has no dependency. -- # cat ./test10.c #include <stdio.h> #include "oslib/linux-dev-lookup.h" int main(void) { /* just to see if it compiles */ blktrace_lookup_device(NULL, NULL, 0, 0); return 0; } # gcc -Wall -g ./test10.c oslib/linux-dev-lookup.c Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com> --- oslib/linux-dev-lookup.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/oslib/linux-dev-lookup.c b/oslib/linux-dev-lookup.c index 2bbd14a..5fbccd3 100644 --- a/oslib/linux-dev-lookup.c +++ b/oslib/linux-dev-lookup.c @@ -5,8 +5,7 @@ #include <stdio.h> #include <unistd.h> -#include "../os/os.h" -#include "oslib/linux-dev-lookup.h" +#include "linux-dev-lookup.h" int blktrace_lookup_device(const char *redirect, char *path, unsigned int maj, unsigned int min) -- 2.9.3 ^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH 0/9] 2017-04-14 21:06 [PATCH 0/9] kusumi.tomohiro ` (8 preceding siblings ...) 2017-04-14 21:06 ` [PATCH 9/9] Make oslib/linux-dev-lookup.c " kusumi.tomohiro @ 2017-04-26 18:43 ` Jens Axboe 9 siblings, 0 replies; 19+ messages in thread From: Jens Axboe @ 2017-04-26 18:43 UTC (permalink / raw) To: kusumi.tomohiro; +Cc: fio, Tomohiro Kusumi On Sat, Apr 15 2017, kusumi.tomohiro@gmail.com wrote: > From: Tomohiro Kusumi <tkusumi@tuxera.com> > > "Fix num2str() output when modulo != -1U" is a resend of below, > which I believe has been neither acked nor nacked. > http://www.spinics.net/lists/fio/msg05719.html > > The patch is the same, but added a link to below comment to the commit message. > http://www.spinics.net/lists/fio/msg05720.html Applied, thanks. -- Jens Axboe ^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 0/9] @ 2014-06-25 1:00 ` Suman Anna 0 siblings, 0 replies; 19+ messages in thread From: Suman Anna @ 2014-06-25 1:00 UTC (permalink / raw) To: Tony Lindgren Cc: Paul Walmsley, Dave Gerlach, Jassi Brar, linux-omap, linux-arm-kernel, devicetree, Suman Anna Hi Tony, Paul, This patch series adds the minimal mailbox DT nodes for the SoCs that are currently missing them (OMAP4, AM335x, DRA7). It also limits the legacy mailbox platform device creation only for non-DT boot, and cleans up the legacy hwmod addresses and attributes used for creating the sub-mailbox devices. The sub-mailboxes in DT boot are not created until the OMAP mailbox DT adoption series, and is not an issue since some of the other required hwmod data for using legacy-mode devices have already been cleaned up. The patches are based on 3.16-rc2. The series do not have any order dependencies with the OMAP mailbox cleanup series [1], and can be applied in any order. The following shows the boot logs on various OMAP platforms with just these patches on top of 3.16-rc2: OMAP2 (SDP2430) : http://slexy.org/view/s21gGdJxXP OMAP3 (BeagleXM) : http://slexy.org/view/s2n8Pc83Rp OMAP4 (PandaBoard) : http://slexy.org/view/s21StNWKPz OMAP5 (OMAP5 uEVM) : http://slexy.org/view/s2y3t6HZtk DRA7 (DRA7 EVM) : http://slexy.org/view/s2qY23Mt97 AM33xx (BeagleBone Black) : http://slexy.org/view/s2ce8jj35O AM43xx (AM437x GP EVM) : http://slexy.org/view/s2nttmOLSq [1] http://marc.info/?l=linux-omap&m=140365705821115&w=2 Suman Anna (9): ARM: dts: OMAP4: Add mailbox node ARM: dts: AM33xx: Add mailbox node ARM: dts: AM4372: Correct mailbox node data ARM: dts: DRA7: Add mailbox nodes ARM: DRA7: hwmod_data: Add mailbox hwmod data ARM: OMAP2+: Avoid mailbox legacy device creation for DT-boot ARM: OMAP2: hwmod_data: Remove legacy mailbox data and addrs ARM: OMAP4: hwmod_data: Remove legacy mailbox addrs ARM: AM33xx: hwmod_data: Remove legacy mailbox addrs arch/arm/boot/dts/am33xx.dtsi | 7 + arch/arm/boot/dts/am4372.dtsi | 7 +- arch/arm/boot/dts/dra7.dtsi | 91 ++++++ arch/arm/boot/dts/omap4.dtsi | 7 + arch/arm/mach-omap2/devices.c | 2 +- arch/arm/mach-omap2/omap_hwmod_2420_data.c | 14 - arch/arm/mach-omap2/omap_hwmod_2430_data.c | 13 - .../omap_hwmod_2xxx_3xxx_interconnect_data.c | 9 - .../omap_hwmod_33xx_43xx_interconnect_data.c | 10 - arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 10 - arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 305 +++++++++++++++++++++ arch/arm/mach-omap2/omap_hwmod_common_data.h | 1 - 12 files changed, 412 insertions(+), 64 deletions(-) -- 2.0.0 ^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 0/9] @ 2014-06-25 1:00 ` Suman Anna 0 siblings, 0 replies; 19+ messages in thread From: Suman Anna @ 2014-06-25 1:00 UTC (permalink / raw) To: linux-arm-kernel Hi Tony, Paul, This patch series adds the minimal mailbox DT nodes for the SoCs that are currently missing them (OMAP4, AM335x, DRA7). It also limits the legacy mailbox platform device creation only for non-DT boot, and cleans up the legacy hwmod addresses and attributes used for creating the sub-mailbox devices. The sub-mailboxes in DT boot are not created until the OMAP mailbox DT adoption series, and is not an issue since some of the other required hwmod data for using legacy-mode devices have already been cleaned up. The patches are based on 3.16-rc2. The series do not have any order dependencies with the OMAP mailbox cleanup series [1], and can be applied in any order. The following shows the boot logs on various OMAP platforms with just these patches on top of 3.16-rc2: OMAP2 (SDP2430) : http://slexy.org/view/s21gGdJxXP OMAP3 (BeagleXM) : http://slexy.org/view/s2n8Pc83Rp OMAP4 (PandaBoard) : http://slexy.org/view/s21StNWKPz OMAP5 (OMAP5 uEVM) : http://slexy.org/view/s2y3t6HZtk DRA7 (DRA7 EVM) : http://slexy.org/view/s2qY23Mt97 AM33xx (BeagleBone Black) : http://slexy.org/view/s2ce8jj35O AM43xx (AM437x GP EVM) : http://slexy.org/view/s2nttmOLSq [1] http://marc.info/?l=linux-omap&m=140365705821115&w=2 Suman Anna (9): ARM: dts: OMAP4: Add mailbox node ARM: dts: AM33xx: Add mailbox node ARM: dts: AM4372: Correct mailbox node data ARM: dts: DRA7: Add mailbox nodes ARM: DRA7: hwmod_data: Add mailbox hwmod data ARM: OMAP2+: Avoid mailbox legacy device creation for DT-boot ARM: OMAP2: hwmod_data: Remove legacy mailbox data and addrs ARM: OMAP4: hwmod_data: Remove legacy mailbox addrs ARM: AM33xx: hwmod_data: Remove legacy mailbox addrs arch/arm/boot/dts/am33xx.dtsi | 7 + arch/arm/boot/dts/am4372.dtsi | 7 +- arch/arm/boot/dts/dra7.dtsi | 91 ++++++ arch/arm/boot/dts/omap4.dtsi | 7 + arch/arm/mach-omap2/devices.c | 2 +- arch/arm/mach-omap2/omap_hwmod_2420_data.c | 14 - arch/arm/mach-omap2/omap_hwmod_2430_data.c | 13 - .../omap_hwmod_2xxx_3xxx_interconnect_data.c | 9 - .../omap_hwmod_33xx_43xx_interconnect_data.c | 10 - arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 10 - arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 305 +++++++++++++++++++++ arch/arm/mach-omap2/omap_hwmod_common_data.h | 1 - 12 files changed, 412 insertions(+), 64 deletions(-) -- 2.0.0 ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 0/9] 2014-06-25 1:00 ` Suman Anna @ 2014-06-25 1:09 ` Suman Anna -1 siblings, 0 replies; 19+ messages in thread From: Suman Anna @ 2014-06-25 1:09 UTC (permalink / raw) To: Tony Lindgren Cc: Paul Walmsley, Dave Gerlach, Jassi Brar, linux-omap, linux-arm-kernel, devicetree On 06/24/2014 08:00 PM, Suman Anna wrote: > Hi Tony, Paul, Please ignore this, resent the same message and the series with the proper subject. regards Suman > > This patch series adds the minimal mailbox DT nodes for the SoCs that are > currently missing them (OMAP4, AM335x, DRA7). It also limits the legacy > mailbox platform device creation only for non-DT boot, and cleans up the > legacy hwmod addresses and attributes used for creating the sub-mailbox > devices. The sub-mailboxes in DT boot are not created until the OMAP > mailbox DT adoption series, and is not an issue since some of the other > required hwmod data for using legacy-mode devices have already been > cleaned up. > > The patches are based on 3.16-rc2. The series do not have any order > dependencies with the OMAP mailbox cleanup series [1], and can be applied > in any order. The following shows the boot logs on various OMAP platforms > with just these patches on top of 3.16-rc2: > OMAP2 (SDP2430) : http://slexy.org/view/s21gGdJxXP > OMAP3 (BeagleXM) : http://slexy.org/view/s2n8Pc83Rp > OMAP4 (PandaBoard) : http://slexy.org/view/s21StNWKPz > OMAP5 (OMAP5 uEVM) : http://slexy.org/view/s2y3t6HZtk > DRA7 (DRA7 EVM) : http://slexy.org/view/s2qY23Mt97 > AM33xx (BeagleBone Black) : http://slexy.org/view/s2ce8jj35O > AM43xx (AM437x GP EVM) : http://slexy.org/view/s2nttmOLSq > > [1] http://marc.info/?l=linux-omap&m=140365705821115&w=2 > > Suman Anna (9): > ARM: dts: OMAP4: Add mailbox node > ARM: dts: AM33xx: Add mailbox node > ARM: dts: AM4372: Correct mailbox node data > ARM: dts: DRA7: Add mailbox nodes > ARM: DRA7: hwmod_data: Add mailbox hwmod data > ARM: OMAP2+: Avoid mailbox legacy device creation for DT-boot > ARM: OMAP2: hwmod_data: Remove legacy mailbox data and addrs > ARM: OMAP4: hwmod_data: Remove legacy mailbox addrs > ARM: AM33xx: hwmod_data: Remove legacy mailbox addrs > > arch/arm/boot/dts/am33xx.dtsi | 7 + > arch/arm/boot/dts/am4372.dtsi | 7 +- > arch/arm/boot/dts/dra7.dtsi | 91 ++++++ > arch/arm/boot/dts/omap4.dtsi | 7 + > arch/arm/mach-omap2/devices.c | 2 +- > arch/arm/mach-omap2/omap_hwmod_2420_data.c | 14 - > arch/arm/mach-omap2/omap_hwmod_2430_data.c | 13 - > .../omap_hwmod_2xxx_3xxx_interconnect_data.c | 9 - > .../omap_hwmod_33xx_43xx_interconnect_data.c | 10 - > arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 10 - > arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 305 +++++++++++++++++++++ > arch/arm/mach-omap2/omap_hwmod_common_data.h | 1 - > 12 files changed, 412 insertions(+), 64 deletions(-) > ^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 0/9] @ 2014-06-25 1:09 ` Suman Anna 0 siblings, 0 replies; 19+ messages in thread From: Suman Anna @ 2014-06-25 1:09 UTC (permalink / raw) To: linux-arm-kernel On 06/24/2014 08:00 PM, Suman Anna wrote: > Hi Tony, Paul, Please ignore this, resent the same message and the series with the proper subject. regards Suman > > This patch series adds the minimal mailbox DT nodes for the SoCs that are > currently missing them (OMAP4, AM335x, DRA7). It also limits the legacy > mailbox platform device creation only for non-DT boot, and cleans up the > legacy hwmod addresses and attributes used for creating the sub-mailbox > devices. The sub-mailboxes in DT boot are not created until the OMAP > mailbox DT adoption series, and is not an issue since some of the other > required hwmod data for using legacy-mode devices have already been > cleaned up. > > The patches are based on 3.16-rc2. The series do not have any order > dependencies with the OMAP mailbox cleanup series [1], and can be applied > in any order. The following shows the boot logs on various OMAP platforms > with just these patches on top of 3.16-rc2: > OMAP2 (SDP2430) : http://slexy.org/view/s21gGdJxXP > OMAP3 (BeagleXM) : http://slexy.org/view/s2n8Pc83Rp > OMAP4 (PandaBoard) : http://slexy.org/view/s21StNWKPz > OMAP5 (OMAP5 uEVM) : http://slexy.org/view/s2y3t6HZtk > DRA7 (DRA7 EVM) : http://slexy.org/view/s2qY23Mt97 > AM33xx (BeagleBone Black) : http://slexy.org/view/s2ce8jj35O > AM43xx (AM437x GP EVM) : http://slexy.org/view/s2nttmOLSq > > [1] http://marc.info/?l=linux-omap&m=140365705821115&w=2 > > Suman Anna (9): > ARM: dts: OMAP4: Add mailbox node > ARM: dts: AM33xx: Add mailbox node > ARM: dts: AM4372: Correct mailbox node data > ARM: dts: DRA7: Add mailbox nodes > ARM: DRA7: hwmod_data: Add mailbox hwmod data > ARM: OMAP2+: Avoid mailbox legacy device creation for DT-boot > ARM: OMAP2: hwmod_data: Remove legacy mailbox data and addrs > ARM: OMAP4: hwmod_data: Remove legacy mailbox addrs > ARM: AM33xx: hwmod_data: Remove legacy mailbox addrs > > arch/arm/boot/dts/am33xx.dtsi | 7 + > arch/arm/boot/dts/am4372.dtsi | 7 +- > arch/arm/boot/dts/dra7.dtsi | 91 ++++++ > arch/arm/boot/dts/omap4.dtsi | 7 + > arch/arm/mach-omap2/devices.c | 2 +- > arch/arm/mach-omap2/omap_hwmod_2420_data.c | 14 - > arch/arm/mach-omap2/omap_hwmod_2430_data.c | 13 - > .../omap_hwmod_2xxx_3xxx_interconnect_data.c | 9 - > .../omap_hwmod_33xx_43xx_interconnect_data.c | 10 - > arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 10 - > arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 305 +++++++++++++++++++++ > arch/arm/mach-omap2/omap_hwmod_common_data.h | 1 - > 12 files changed, 412 insertions(+), 64 deletions(-) > ^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 0/9] @ 2013-04-04 16:16 Alex Elder 2013-04-05 3:03 ` Josh Durgin 0 siblings, 1 reply; 19+ messages in thread From: Alex Elder @ 2013-04-04 16:16 UTC (permalink / raw) To: ceph-devel (The following patches are available in branch "review/wip-3761" on the ceph-client git respository.) These are actually a few sets of patches but I'm just going to post them as a single series this time. -Alex [PATCH 1/9] ceph: use page_offset() in ceph_writepages_start() Fixes a potential bug in ceph_writepages_start(). [PATCH 2/9] libceph: drop ceph_osd_request->r_con_filling_msg Removes a no-longer-needed field, to simplify code. [PATCH 3/9] libceph: record length of bio list with bio [PATCH 4/9] libceph: record message data length Has each message maintain its data length, so we can avoid depending on what's in the message's header. [PATCH 5/9] libceph: don't build request in ceph_osdc_new_request() [PATCH 6/9] ceph: define ceph_writepages_osd_request() [PATCH 7/9] ceph: kill ceph alloc_page_vec() [PATCH 8/9] libceph: hold off building osd request [PATCH 9/9] ceph: build osd request message later for writepages Defers "building" a request message until right before it's submitted to the osd client to start its execution. Also stops having the length field in a message header get updated by the file system code. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 0/9] 2013-04-04 16:16 Alex Elder @ 2013-04-05 3:03 ` Josh Durgin 2013-04-05 12:09 ` Alex Elder 0 siblings, 1 reply; 19+ messages in thread From: Josh Durgin @ 2013-04-05 3:03 UTC (permalink / raw) To: Alex Elder; +Cc: ceph-devel On 04/04/2013 09:16 AM, Alex Elder wrote: > (The following patches are available in branch "review/wip-3761" > on the ceph-client git respository.) > > These are actually a few sets of patches but I'm just going to > post them as a single series this time. > > -Alex > > [PATCH 1/9] ceph: use page_offset() in ceph_writepages_start() > Fixes a potential bug in ceph_writepages_start(). > > [PATCH 2/9] libceph: drop ceph_osd_request->r_con_filling_msg > Removes a no-longer-needed field, to simplify code. > > [PATCH 3/9] libceph: record length of bio list with bio > [PATCH 4/9] libceph: record message data length > Has each message maintain its data length, so we can > avoid depending on what's in the message's header. > > [PATCH 5/9] libceph: don't build request in ceph_osdc_new_request() > [PATCH 6/9] ceph: define ceph_writepages_osd_request() > [PATCH 7/9] ceph: kill ceph alloc_page_vec() > [PATCH 8/9] libceph: hold off building osd request > [PATCH 9/9] ceph: build osd request message later for writepages > Defers "building" a request message until right before > it's submitted to the osd client to start its execution. > Also stops having the length field in a message header > get updated by the file system code. These all look good. The one thing I'm uncertain about is changing the mempool allocation failure from a WARN to a BUG, but it seems there's no good way to recover at that point. Reviewed-by: Josh Durgin <josh.durgin@inktank.com> ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 0/9] 2013-04-05 3:03 ` Josh Durgin @ 2013-04-05 12:09 ` Alex Elder 0 siblings, 0 replies; 19+ messages in thread From: Alex Elder @ 2013-04-05 12:09 UTC (permalink / raw) To: Josh Durgin; +Cc: ceph-devel On 04/04/2013 10:03 PM, Josh Durgin wrote: > On 04/04/2013 09:16 AM, Alex Elder wrote: >> (The following patches are available in branch "review/wip-3761" >> on the ceph-client git respository.) >> >> These are actually a few sets of patches but I'm just going to >> post them as a single series this time. >> >> -Alex >> >> [PATCH 1/9] ceph: use page_offset() in ceph_writepages_start() >> Fixes a potential bug in ceph_writepages_start(). . . . >> [PATCH 9/9] ceph: build osd request message later for writepages >> Defers "building" a request message until right before >> it's submitted to the osd client to start its execution. >> Also stops having the length field in a message header >> get updated by the file system code. > > These all look good. The one thing I'm uncertain about is changing > the mempool allocation failure from a WARN to a BUG, but it seems > there's no good way to recover at that point. It's reality. About 20 lines later, pages is dereferenced. I think it's better to stop at the point of the failure and report exactly where it occurred than to (most likely) crash more mysteriously a little later on. If we exhaust the mempool, it wasn't big enough, and that's a bug in the size of the mempool or the design. Thanks a lot for the review. More on their way shortly. -Alex > Reviewed-by: Josh Durgin <josh.durgin@inktank.com> > ^ permalink raw reply [flat|nested] 19+ messages in thread
* RE: [RFC PATCH v3] Consolidate SRAM support @ 2011-05-17 13:06 Nori, Sekhar 2011-05-17 21:41 ` [PATCH 0/9] Ben Gardiner 0 siblings, 1 reply; 19+ messages in thread From: Nori, Sekhar @ 2011-05-17 13:06 UTC (permalink / raw) To: Russell King - ARM Linux, Hilman, Kevin, Tony Lindgren Cc: davinci-linux-open-source, linux-omap, linux-arm-kernel Hi Russell, On Thu, May 12, 2011 at 23:15:46, Russell King - ARM Linux wrote: > diff --git a/arch/arm/mach-davinci/pm.c b/arch/arm/mach-davinci/pm.c > index 1bd73a0..c2f9767 100644 > --- a/arch/arm/mach-davinci/pm.c > +++ b/arch/arm/mach-davinci/pm.c [...] > @@ -123,14 +118,14 @@ static int __init davinci_pm_probe(struct platform_device *pdev) > return -ENOENT; > } > > - davinci_sram_suspend = sram_alloc(davinci_cpu_suspend_sz, NULL); > - if (!davinci_sram_suspend) { > + davinci_sram_suspend_mem = pv_pool_alloc(davinci_pv_pool, > + davinci_cpu_suspend_sz, NULL); > + if (!davinci_sram_suspend_mem) { > dev_err(&pdev->dev, "cannot allocate SRAM memory\n"); > return -ENOMEM; > } > - > - davinci_sram_push(davinci_sram_suspend, davinci_cpu_suspend, > - davinci_cpu_suspend_sz); > + davinci_sram_suspend = fncpy(davinci_sram_suspend_mem, > + davinci_cpu_suspend, davinci_cpu_suspend_sz); This gave these build errors: arch/arm/mach-davinci/pm.c: In function 'davinci_pm_probe': arch/arm/mach-davinci/pm.c:127: error: lvalue required in asm statement arch/arm/mach-davinci/pm.c:127: error: invalid lvalue in asm output 0 make[1]: *** [arch/arm/mach-davinci/pm.o] Error 1 Replacing davinci_cpu_suspend with &davinci_cpu_suspend fixed the issue. With that change done, tested suspend-to-RAM on DA850 platform. Also tested audio driver on DM365 platform with IRAM buffers enabled. Can you also fold the following patch in? Without this the kernel panics when suspend-to-RAM is enabled. diff --git a/arch/arm/mach-davinci/sleep.S b/arch/arm/mach-davinci/sleep.S index fb5e72b..2cef533 100644 --- a/arch/arm/mach-davinci/sleep.S +++ b/arch/arm/mach-davinci/sleep.S @@ -37,6 +37,7 @@ #define DEEPSLEEP_SLEEPENABLE_BIT BIT(31) .text + .align 3 /* * Move DaVinci into deep sleep state * Thanks, Sekhar ^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 0/9] 2011-05-17 13:06 [RFC PATCH v3] Consolidate SRAM support Nori, Sekhar @ 2011-05-17 21:41 ` Ben Gardiner 0 siblings, 0 replies; 19+ messages in thread From: Ben Gardiner @ 2011-05-17 21:41 UTC (permalink / raw) To: linux-arm-kernel The davinci platforms are mapping their io regions using iotables. This patch series converts them to mapping using ioremap. This series is based on-top-of '[RFC PATCH v3] Consolidate SRAM support' from Russell King. The first patch in the series is a squash of the neccessary changes as reported by Sekhar Nori in that thread. The davinci sram init is first changed to ioremap the regions specified by each of the soc_infos; then the iotables are each removed; then the SRAM_VIRT definition is removed. Finally, the da850's sram region is changed from the ARM local RAM region to the Shared RAM region. This change is needed to support mcasp ping-pong buffers on da850. Suspend was tested with rtcwake and was found to work. Ben Gardiner (7): davinci: sram: ioremap the davinci_soc_info specified sram regions davinci: da850: remove the SRAM_VIRT iotable entry davinci: dm355: remove the SRAM_VIRT iotable entry davinci: dm365: remove the SRAM_VIRT iotable entry davinci: dm644x: remove the SRAM_VIRT iotable entry davinci: dm646x: remove the SRAM_VIRT iotable entry davinci: remove definition of SRAM_VIRT Nori, Sekhar (1): davinci: pm: fix compiler errors and kernel panics from sram consolidation Subhasish Ghosh (1): davinci: da850: changed SRAM allocator to shared ram. arch/arm/mach-davinci/da850.c | 10 ++-------- arch/arm/mach-davinci/dm355.c | 6 ------ arch/arm/mach-davinci/dm365.c | 6 ------ arch/arm/mach-davinci/dm644x.c | 6 ------ arch/arm/mach-davinci/dm646x.c | 6 ------ arch/arm/mach-davinci/include/mach/common.h | 2 -- arch/arm/mach-davinci/include/mach/da8xx.h | 1 + arch/arm/mach-davinci/pm.c | 2 +- arch/arm/mach-davinci/sleep.S | 1 + arch/arm/mach-davinci/sram.c | 12 ++++++++++-- 10 files changed, 15 insertions(+), 37 deletions(-) -- 1.7.4.1 ^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2017-04-26 18:43 UTC | newest] Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-04-14 21:06 [PATCH 0/9] kusumi.tomohiro 2017-04-14 21:06 ` [PATCH 1/9] Fix num2str() output when modulo != -1U kusumi.tomohiro 2017-04-14 21:06 ` [PATCH 2/9] Drop the only local variable declaration within a for-loop (C99) kusumi.tomohiro 2017-04-14 21:06 ` [PATCH 3/9] Make lib/strntol.c a stand-alone library kusumi.tomohiro 2017-04-14 21:06 ` [PATCH 4/9] Make lib/pattern.c " kusumi.tomohiro 2017-04-14 21:06 ` [PATCH 5/9] Make lib/rand.c " kusumi.tomohiro 2017-04-14 21:06 ` [PATCH 6/9] Make lib/zipf.c " kusumi.tomohiro 2017-04-14 21:06 ` [PATCH 7/9] Make lib/mountcheck.c " kusumi.tomohiro 2017-04-14 21:06 ` [PATCH 8/9] Make oslib/strlcat.c " kusumi.tomohiro 2017-04-14 21:06 ` [PATCH 9/9] Make oslib/linux-dev-lookup.c " kusumi.tomohiro 2017-04-26 18:43 ` [PATCH 0/9] Jens Axboe -- strict thread matches above, loose matches on Subject: below -- 2014-06-25 1:00 Suman Anna 2014-06-25 1:00 ` Suman Anna 2014-06-25 1:09 ` Suman Anna 2014-06-25 1:09 ` Suman Anna 2013-04-04 16:16 Alex Elder 2013-04-05 3:03 ` Josh Durgin 2013-04-05 12:09 ` Alex Elder 2011-05-17 13:06 [RFC PATCH v3] Consolidate SRAM support Nori, Sekhar 2011-05-17 21:41 ` [PATCH 0/9] Ben Gardiner
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.