Merge branch 'proc_group' of https://github.com/sitsofe/fio
authorJens Axboe <axboe@kernel.dk>
Fri, 13 Apr 2018 23:25:35 +0000 (17:25 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 13 Apr 2018 23:25:35 +0000 (17:25 -0600)
* 'proc_group' of https://github.com/sitsofe/fio:
  doc: add cpus_allowed reference to log_compression_cpus
  appveyor: make 32 bit build target XP + minor fixes
  configure/Makefile: make Cygwin force less
  doc: add Windows processor group behaviour and Windows target option
  windows: target Windows 7 and add support for more than 64 CPUs
  windows: prepare for Windows build split
  windows: update EULA

1  2 
Makefile
configure
server.c

diff --combined Makefile
index cc4b71f0eacea76de9a8c44df5eb889bd2b659d2,5ab79234afe52bf689220bc680452bf2bd8b1343..357ae983b843586b5bbb1f95f39ff1fb9583f80d
+++ b/Makefile
@@@ -59,9 -59,6 +59,6 @@@ ifdef CONFIG_LIBHDF
    SOURCE += engines/libhdfs.c
  endif
  
- ifdef CONFIG_64BIT_LLP64
-   CFLAGS += -DBITS_PER_LONG=32
- endif
  ifdef CONFIG_64BIT
    CFLAGS += -DBITS_PER_LONG=64
  endif
@@@ -148,7 -145,7 +145,7 @@@ endi
  
  ifeq ($(CONFIG_TARGET_OS), Linux)
    SOURCE += diskutil.c fifo.c blktrace.c cgroup.c trim.c engines/sg.c \
 -              engines/binject.c oslib/linux-dev-lookup.c
 +              oslib/linux-dev-lookup.c
    LIBS += -lpthread -ldl
    LDFLAGS += -rdynamic
  endif
diff --combined configure
index 38706a9263d289d7ae06592fdb26bd176d72f690,a5c0f6ef84482d95fa0e7c2fbf45591a7921b134..32baec64097254a62503a6e8bdc928d8d90cd731
+++ b/configure
@@@ -167,6 -167,8 +167,8 @@@ for opt d
    ;;
    --build-32bit-win) build_32bit_win="yes"
    ;;
+   --target-win-ver=*) target_win_ver="$optarg"
+   ;;
    --build-static) build_static="yes"
    ;;
    --enable-gfio) gfio_check="yes"
@@@ -213,6 -215,7 +215,7 @@@ if test "$show_help" = "yes" ; the
    echo "--cc=                   Specify compiler to use"
    echo "--extra-cflags=         Specify extra CFLAGS to pass to compiler"
    echo "--build-32bit-win       Enable 32-bit build on Windows"
+   echo "--target-win-ver=       Minimum version of Windows to target (XP or 7)"
    echo "--build-static          Build a static fio"
    echo "--esx                   Configure build options for esx"
    echo "--enable-gfio           Enable building of gtk gfio"
@@@ -329,20 -332,27 +332,27 @@@ CYGWIN*
        cc="x86_64-w64-mingw32-gcc"
      fi
    fi
-   if test ! -z "$build_32bit_win" && test "$build_32bit_win" = "yes"; then
-     output_sym "CONFIG_32BIT"
+   target_win_ver=$(echo "$target_win_ver" | tr '[:lower:]' '[:upper:]')
+   if test -z "$target_win_ver"; then
+     # Default Windows API target
+     target_win_ver="7"
+   fi
+   if test "$target_win_ver" = "XP"; then
+     output_sym "CONFIG_WINDOWS_XP"
+   elif test "$target_win_ver" = "7"; then
+     output_sym "CONFIG_WINDOWS_7"
+     CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0601"
    else
-     output_sym "CONFIG_64BIT_LLP64"
+     fatal "Unknown target Windows version"
    fi
    # We need this to be output_sym'd here because this is Windows specific.
    # The regular configure path never sets this config.
    output_sym "CONFIG_WINDOWSAIO"
    # We now take the regular configuration path without having exit 0 here.
    # Flags below are still necessary mostly for MinGW.
    socklen_t="yes"
-   sfaa="yes"
-   sync_sync="yes"
-   cmp_swap="yes"
    rusage_thread="yes"
    fdatasync="yes"
    clock_gettime="yes" # clock_monotonic probe has dependency on this
    gettimeofday="yes"
    sched_idle="yes"
    tcp_nodelay="yes"
-   tls_thread="yes"
-   static_assert="yes"
    ipv6="yes"
-   mkdir_two="no"
-   echo "BUILD_CFLAGS=$CFLAGS -include config-host.h -D_GNU_SOURCE" >> $config_host_mak
    ;;
  esac
  
@@@ -498,6 -504,9 +504,9 @@@ f
  print_config "Operating system" "$targetos"
  print_config "CPU" "$cpu"
  print_config "Big endian" "$bigendian"
+ if test ! -z "$target_win_ver"; then
+   print_config "Target Windows version" "$target_win_ver"
+ fi
  print_config "Compiler" "$cc"
  print_config "Cross compile" "$cross_compile"
  echo
@@@ -600,7 -609,7 +609,7 @@@ int main(void
  EOF
  if compile_prog "" "" "posixaio" ; then
    posix_aio="yes"
 -elif compile_prog "" "-lrt" "posixaio"; then
 +elif compile_prog "" "-lrt" "posixaio -lrt"; then
    posix_aio="yes"
    posix_aio_lrt="yes"
    LIBS="-lrt $LIBS"
@@@ -2108,23 -2117,18 +2117,23 @@@ if test "$march_armv8_a_crc_crypto" != 
  fi
  if test "$cpu" = "arm64" ; then
    cat > $TMPC <<EOF
 -#include <sys/auxv.h>
  #include <arm_acle.h>
  #include <arm_neon.h>
 +#include <sys/auxv.h>
  
  int main(void)
  {
 -  return 0;
 +  /* Can we also do a runtime probe? */
 +#if __linux__
 +  return getauxval(AT_HWCAP);
 +#else
 +# error "Don't know how to do runtime probe for ARM CRC32c"
 +#endif
  }
  EOF
 -  if compile_prog "-march=armv8-a+crc+crypto" "" ""; then
 +  if compile_prog "-march=armv8-a+crc+crypto" "" "ARM CRC32c"; then
      march_armv8_a_crc_crypto="yes"
 -    CFLAGS="$CFLAGS -march=armv8-a+crc+crypto -DARCH_HAVE_CRC_CRYPTO"
 +    CFLAGS="$CFLAGS -march=armv8-a+crc+crypto"
      march_set="yes"
    fi
  fi
@@@ -2426,9 -2430,6 +2435,9 @@@ if test "$zlib" = "no" ; the
      echo "Note that some distros have separate packages for static libraries."
    fi
  fi
 +if test "$march_armv8_a_crc_crypto" = "yes" ; then
 +  output_sym "ARCH_HAVE_CRC_CRYPTO"
 +fi
  if test "$cuda" = "yes" ; then
    output_sym "CONFIG_CUDA"
  fi
diff --combined server.c
index 2e08c66a103fd40a06469c3a5da30632ca6de89a,90c7057719d200871f1a325a6ad042f8a610b775..12c8d6841135437f4b3d06210aaa1ce74c9fd9b2
+++ b/server.c
@@@ -1199,6 -1199,7 +1199,6 @@@ static int handle_connection(struct sk_
                        .events = POLLIN,
                };
  
 -              ret = 0;
                do {
                        int timeout = 1000;
  
@@@ -2144,14 -2145,14 +2144,14 @@@ static int fio_init_server_ip(void
  #endif
  
        if (use_ipv6) {
-               const void *src = &saddr_in6.sin6_addr;
+               void *src = &saddr_in6.sin6_addr;
  
                addr = (struct sockaddr *) &saddr_in6;
                socklen = sizeof(saddr_in6);
                saddr_in6.sin6_family = AF_INET6;
                str = inet_ntop(AF_INET6, src, buf, sizeof(buf));
        } else {
-               const void *src = &saddr_in.sin_addr;
+               void *src = &saddr_in.sin_addr;
  
                addr = (struct sockaddr *) &saddr_in;
                socklen = sizeof(saddr_in);
@@@ -2219,7 -2220,7 +2219,7 @@@ static int fio_init_server_connection(v
  
        if (!bind_sock) {
                char *p, port[16];
-               const void *src;
+               void *src;
                int af;
  
                if (use_ipv6) {