Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure of 6.2.1.102 against 4.19.10 kernel #22

Closed
brettwooldridge opened this issue Jun 18, 2019 · 6 comments
Closed

Build failure of 6.2.1.102 against 4.19.10 kernel #22

brettwooldridge opened this issue Jun 18, 2019 · 6 comments

Comments

@brettwooldridge
Copy link

I am getting the following compilation error using tag 6.2.1.102 against kernel version 4.19.10:

In file included from /kvdo/vdo/../uds/memoryAlloc.h:30,
                 from /kvdo/vdo/kernel/histogram.c:24:
/kvdo/vdo/kernel/histogram.c: In function 'makeLogarithmicJiffiesHistogram':
/kvdo/vdo/../uds/permassert.h:114:5: error: duplicate case value
     case expr:              \
     ^~~~
/kvdo/vdo/kernel/histogram.c:600:3: note: in expansion of macro 'STATIC_ASSERT'
   STATIC_ASSERT((MSEC_PER_SEC % HZ) == 0);
   ^~~~~~~~~~~~~
/kvdo/vdo/../uds/permassert.h:113:5: note: previously used here
     case 0:                 \
     ^~~~
/kvdo/vdo/kernel/histogram.c:600:3: note: in expansion of macro 'STATIC_ASSERT'
   STATIC_ASSERT((MSEC_PER_SEC % HZ) == 0);
   ^~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:303: /kvdo/vdo/kernel/histogram.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [scripts/Makefile.build:544: /kvdo/vdo] Error 2
make: *** [Makefile:1517: _module_/kvdo] Error 2
make: Leaving directory '/usr/src/linux-4.19.10'
@brettwooldridge brettwooldridge changed the title Build failure on 4.19.10 kernel Build failure of 6.2.1.102 against 4.19.10 kernel Jun 18, 2019
@ghost
Copy link

ghost commented Jun 25, 2019

@bgurney-rh
Copy link

For this system with kernel 4.19.10, what's the full kernel string? (In other words, what would you see if you ran "uname -r" in this kernel?)

Looking at the arch link above, if the kernel config has "CONFIG_HZ=300", this will result in 3.333333333333 milliseconds per jiffy

@bgurney-rh
Copy link

Note that the CONFIG_HZ kernel option can be different between Linux distributions; Fedora uses CONFIG_HZ=1000, and on checking an older Debian system, I see CONFIG_HZ=250.

@brettwooldridge
Copy link
Author

Yeah, we figured that out. We’re recompiling the kernel with HZ=250.

Looking at the code it appears it needs to be refactored to dynamically calculate the histogram interval. Comments in the code seem to note this improvement requirement.

@corwin
Copy link
Contributor

corwin commented Jul 17, 2019

We will be fixing this in a future version, but it will be a few months before we get around to it. In the mean time, if recompiling the kernel with a different HZ setting is not a good long-term solution, removing the failing assertion should be safe. The only downside is that the histograms and possibly some other timing-related statistics may be inaccurate. The actual functioning of the device should be unaffected.

@brettwooldridge
Copy link
Author

@corwin Thanks. We recompiled the kernel with HZ=250 and as a result are able to compile kvdo successfully. We are still having issues creating a volume, but it seems unrelated to this issue, so I am closing this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants