Tarantool development patches archive
 help / color / mirror / Atom feed
From: "Timur Safin" <tsafin@tarantool.org>
To: 'Vladislav Shpilevoy' <v.shpilevoy@tarantool.org>,
	'Cyrill Gorcunov' <gorcunov@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v1.1] evio: workaround for wsl1 so_linger assertion
Date: Tue, 17 Mar 2020 17:40:57 +0300	[thread overview]
Message-ID: <05d301d5fc6a$125aa140$370fe3c0$@tarantool.org> (raw)
In-Reply-To: <8b260724-43f4-ea28-44f8-2ed423ea410e@tarantool.org>

Hi there!

: -----Original Message-----
: From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
: Subject: Re: [PATCH v1.1] evio: workaround for wsl1 so_linger assertion
: 
: Hi! Thanks for the patch!
: 
: Please, keep branch link in each new email thread.

Yup, sorry for the omission, I should automate this somehow 
(because at the moment there are too many manual steps which are 
easy to forget or to skip. Do you have any advices/scripts here?)

: > @@ -11,6 +11,15 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
: >  # (see man page for feature_test_macros).
: >      add_definitions("-D_FILE_OFFSET_BITS=64")
: >      find_package_message(PLATFORM "Building for Linux"
: "${CMAKE_SYSTEM_NAME}")
: > +
: > +    # There are some subtle differences in Linux kernel calls
: > +    # implementation under WSL1 (which should go away with WSL2 kernel)
: > +    # so for a moment we introduce a way to distinguish Linux and
: > +    # Microsoft/WSL1
: > +    if (${CMAKE_SYSTEM} MATCHES "Linux-.*-Microsoft")
: > +        add_definitions("-DTARANTOOL_WSL1_WORKAROUND_ENABLED=1")
: > +    endif()
: 
: To be more consistent I would better call it TARGET_OS_WSL1.
: Since we already have TARGET_OS_LINUX, TARGET_OS_FREEBSD,
: TARGET_OS_DEBIAN_FREEBSD, TARGET_OS_NETBSD, TARGET_OS_DARWIN.
: 

I did consider introducing the special target, but after some 
evaluation I've realized that this is not a new target, but rather 
Linux flavor (with the same abi, binutils, glibc implementation)
but slightly different syscalls implementation. Which difference 
after WSL2 release would go away the end of Spring 2020.


: Besides, it would be consistent with other similar examples
: such as fio_filename(), load_cfg(), make_pipe(), and so on. They
: use TARGET_OS_* name.

And this example of fio_filename() implementation is exactly 
and indication why WSL is still the same Linux - it is requiring the same
exactly TARGET_OS_LINUX defined to be correctly implemented under WSL.


: 
: > +
: >  elseif (${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD")
: >      set(TARGET_OS_FREEBSD 1)
: >      set(TARGET_OS_DEBIAN_FREEBSD 1)
: > @@ -19,6 +28,7 @@ elseif (${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD")
: >      add_definitions("-D_FILE_OFFSET_BITS=64")
: >      find_package_message(PLATFORM "Building for Debian/kFreeBSD"
: >          "${CMAKE_SYSTEM_NAME}")
: > +
: 
: Please, omit not necessary diff. This and other new empty lines
: below.
:

Ok, will remove these unnecessary lines added (though they did 
add some extra readability to the cmake scripts we have here :) ) 
 
Regards,
Timur

  reply	other threads:[~2020-03-17 14:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bb3eef527b48bdd3aacddc27e0597ceedcb84987.1584371177.git.tsafin@tarantool.org>
2020-03-16 16:53 ` Timur Safin
2020-03-16 22:35   ` Vladislav Shpilevoy
2020-03-17 14:40     ` Timur Safin [this message]
2020-03-17 21:27       ` Vladislav Shpilevoy
2020-03-18  7:12         ` Timur Safin
2020-03-19 10:27 ` [Tarantool-patches] [PATCH v1.2] " Timur Safin
2020-03-19 10:52   ` Cyrill Gorcunov
2020-03-19 11:07     ` Timur Safin
2020-03-22 19:21   ` Vladislav Shpilevoy
2020-03-23 23:12     ` Vladislav Shpilevoy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='05d301d5fc6a$125aa140$370fe3c0$@tarantool.org' \
    --to=tsafin@tarantool.org \
    --cc=gorcunov@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v1.1] evio: workaround for wsl1 so_linger assertion' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox