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

Refine select nodelay #211

Merged
merged 62 commits into from
Mar 20, 2024
Merged

Refine select nodelay #211

merged 62 commits into from
Mar 20, 2024

Conversation

yizhuoliang
Copy link
Contributor

@yizhuoliang yizhuoliang commented Mar 11, 2024

Description

Before this, select() on inet sockets experience lock contention on SocketHandles and degrades the performance of nginx. So now we added domain and system raw fd into SocketDest, so select() won't need to acquire sockhandle locks for every fd now. Note that the domain is set at the point of socket creation, but the rawfd field is set at listen, connect, and accept. The fundamental reason we can do this is that, both domain and rawfd can't change once it is set.

Also changed the options field of a scokethandle to be socket_options and tcp_options, as we are handling two different levels of socket options. Thus changing getsockopt and setsockopt.

Also because select() on inet sockets don't access sockhanldes, we added checks at recv_syscall to see if the INPROGRESS state is already changed to CONNECTED.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

}

// for each fd, if kernel_fds turned it on, then self will turn the corresponding tranlated fd on
pub fn set_from_kernelfds_and_translate(&mut self, kernel_fds: &FdSet, nfds: i32, rawfd_lindfd_tuples: &Vec<(i32, i32)>) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

theres a lot of nesting here, maybe condense some of this to one liners for readability

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following Nick's suggestion, the nested loop can be modified as something like this:

use std::collections::HashMap;

pub fn set_from_kernelfds_and_translate(&mut self, kernel_fds: &FdSet, nfds: i32, rawfd_lindfd_tuples: &Vec<(i32, i32)>) {
    // Create a HashMap from the rawfd_lindfd_tuples for O(1) look-up
    let fd_map: HashMap<i32, i32> = rawfd_lindfd_tuples.iter().cloned().collect();
    for fd in 0..nfds {
        if kernel_fds.is_set(fd) {
            if let Some(lindfd) = fd_map.get(&fd) {
                self.set(*lindfd);
            }
        }
    }
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is probably not a great idea because I believe creating a hashmap is slow, so even though the algorithmic complexity may be better N should never be large enough where it surpasses that allocation cost.

Copy link
Contributor

@rennergade rennergade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some initial thoughts

// note that this select call always have timeout = 0, so it doesn't block

kernel_ret = interface::kernel_select(highest_raw_fd + 1, Some(kernel_inet_fds), None, None);
if kernel_ret < 0 {return kernel_ret}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is wrong to return kernel ret, we may have increased the return number earlier and at this point don't want to return an error. right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also probably should handle kernel_ret = 0

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't fully understand what is

we may have increased the return number earlier and at this point don't want to return an error

Does that mean we should return syscall_error when kernel_ret < 0?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant we may have found a ready descriptor that isnt a kernel socket before we do the internal select. If thats the case we still want to return that information.

Copy link
Contributor

@justyoyo123 justyoyo123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes look good to me.

Copy link

@yzhang71 yzhang71 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except for the parts with the nested loops (see detailed comments), everything looks good to me.

if readfds.is_some() {
let res = self.select_readfds(nfds, readfds.unwrap(), new_readfds, &mut retval);
if let Some(readfds_ref) = readfds.as_ref() {
let res = self.select_readfds(nfds, readfds_ref, new_readfds, &mut retval);
if res != 0 {return res}
Copy link
Member

@Yaxuan-w Yaxuan-w Mar 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may need to handle error cases here? or in select_readfs()

Copy link
Member

@Yaxuan-w Yaxuan-w left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The overall implementation logic makes sense to me! Great work!!

return result;
}

pub struct SelectInetInfo {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this struct should probably be in net.rs

Copy link
Contributor

@rennergade rennergade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great, minor change request then good to merge

use std::mem::size_of;
use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
use std::fs::read_to_string;
use std::str::from_utf8;
use std::os::unix::io::{AsRawFd, RawFd};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't actually need to import this. Can't we just use ints?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch

Copy link
Contributor

@rennergade rennergade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One last thing, I think we dont need to import the RawFD type

use std::mem::size_of;
use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
use std::fs::read_to_string;
use std::str::from_utf8;
use std::os::unix::io::{AsRawFd, RawFd};
use std::mem;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also we import mem:size_of above, maybe combine and just import what you need?

Copy link
Contributor

@rennergade rennergade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome. Great job!

@rennergade rennergade merged commit 8fcde0b into develop Mar 20, 2024
1 check failed
yashaswi2000 pushed a commit that referenced this pull request Mar 28, 2024
* rewrite FdSet and it's uses

* FdSet init from raw fd_set

* attempt to fix borrowing, kernel_select nonblocking

* attempt continued

* fix is_set

* attempt to fix borrow checking within select

* fix in-select borrow, fix warnings

* cleanup

* fix a warning

* fix serious typo

* fix typo

* debugging

* debugging

* prints

* prints!!

* debugging

* debugging

* debugging

* debugging

* debug

* debuging

* update

* debug

* debug

* debug

* debug

* debug

* cleanup and refactor

* fixing the nfds parameter for kernel select

* rawfd in socketdesc

* rawfd in socketdesc

* rawfd in socketdesc

* rawfd in socketdesc

* rawfd in socketdesc

* rawfd in socketdesc

* rawfd in socketdesc

* rawfd in socketdesc

* rawfd in socketdesc

* rawfd in socketdesc

* rawfd in socketdesc

* rawfd in socketdesc

* increase timeout

* change gettimeofday log level

* migrate FdSet, nodelay getsockopt, accept rawfd

* small fix

* store rawfd in acpt/lst/cnct, fix INPROGRESS

* fix ownership

* of course domain sockets don't have raw_sys_fd

* fix warnings

* fix warnings

* small coding style fixes

* add blank line

* add TCP level options

* getsockopt tcp without kernel

* add FdSet::clear back for tests

* fix warnings

* fix warning

* revert select sleep

* fix PR suggestions

* refactor kernel select logic

* reorganize

* update

---------

Co-authored-by: Nicholas Renner <nicholassrenner@gmail.com>
rennergade added a commit that referenced this pull request Mar 28, 2024
* Epoll fixes in safeposix, updated net_calls.rs (#140)

* epoll fixes in safeposix

* removing commented lines

* new changes

* using interface::rust_min

Co-authored-by: lind <lind@nyu.edu>

* Add fchmod to safeposix (#143)

* adding fchmod to safeposix

* fixes in dispatcher

* cleaning up comments

* fixing indentation

* fixing indentation

* refactor fchmod and chmod to use helper function

Co-authored-by: lind <lind@nyu.edu>

* Pipe sanity fixes (#145)

* fix verbiage

* fix verbiage

* Shm across fork (#146)

* Changed rev_shm table to cage-local linear vec

* Factored out search rev_shm

* Added foreign interface for copying lind shmat mappings

* Removed unnecessary ffi

* Fix for posix shm for nacl

* Dispatch for shmctl fixed

* Update shm count on exit

* Did the same thing for exec

* fixed pr comments

* Reverted excess newline

* Fixed shmdtret

Co-authored-by: lind <lind@nyu.edu>

* Check select (#148)

* added check_select_read & check_select_write

* pipes support

* fixed syntax

* fixed errors

* fixed reading only if pipe full

* fixed warnings

* made requested changes

* cleaned up check_select_write()

Co-authored-by: lind <lind@nyu.edu>

* Refcount cleanup (#149)

* Cleaned up a bunch of refcount code

(cherry picked from commit b45857b)

* Linkcount cleanup on failure

(cherry picked from commit 210af85)

* added comment

* Removed extra whitespace

* Moved mutexes into rustposix using lbc and made it nicer in general (#150)

* Moved mutexes into rustposix to make them behave correctly

* Spaced out interface raw functions

* Fixed truncate, added ftruncate, put in dispatcher (#151)

* Fixed truncate, added ftruncate, put in dispatcher

* Explanatory comment, underscores

* Removed joke

* Remove Pipetable (#152)

* remove pipetable, add to fds

* make pipe insertion multi line

* Fixed condvar and mutex issue (#153)

* drop inode earlier to prevent deadlock: (#155)

* No Lock Cagetable (#154)

* remove cagetable, move to unsafe vector

* move unsafe to interface

* move unsafe to interface

* move unsafe to interface

* fix exec

* collect cages on exit

* collect cages on exit

* Vector FD Table (#156)

* initial table commit

* compilation fixes

* pass fs and pipe tests

* merge

* fix deadlocks and remove warnings

* merge

* drop inode earlier to prevent deadlock pt2

* PR fixes for jonathan

* PR fixes for jonathan 2

* limit writes to page if possible (#157)

* Overhauled socket representation in rustposix (#159)

* impl libc shutdown

* add new connection states

* add new connection states

* add new connection states

* Sockobj implemented for all except innersocket changes

* Debugging fs_tests and net_tests

* Fixed creation of inner socket before connect

* net_tests runs successfully

* Several fixes to net calls, socket structure

* Got all tests to work

* Added requested PR comments

* Further comment

Co-authored-by: Nicholas Renner <nicholassrenner@gmail.com>

* Socketpair reuseaddr (#161)

* impl libc shutdown

* add new connection states

* add new connection states

* add new connection states

* Sockobj implemented for all except innersocket changes

* Debugging fs_tests and net_tests

* Fixed creation of inner socket before connect

* net_tests runs successfully

* Several fixes to net calls, socket structure

* Got all tests to work

* Added requested PR comments

* Further comment

* REUSEADDR on socketpair

* Add comment

Co-authored-by: Nicholas Renner <nicholassrenner@gmail.com>

* EPIPE and Blocking Read fix (#162)

* implement epipe

* fix blocking read

* Cancel Points (#163)

* add cancel point interface

* add cancel point interface

* add cancel point interface

* add cancel point interface

* implement cancel points

* implement cancel points

* implement cancel points

* refactor cancellation

* refactor cancellation

* refactor cancellation

* merge develp and add recv cancel point

* merge develp and add recv cancel point

* add cv cancellation

* add cv cancellation

* add cv cancellation

* refactor cancel funcs

* more comments

* Io bypass (#165)

* quick io

* quick io

* quick io

* comments

* Sched yield (#166)

* add sched yield

* add sched yield

* add sched yield

* yield on full

* add to interface

* Fix recvloop (#177)

* fix recv loop for blocking sockets

* fix recv loop for blocking sockets

* drop sockhandle for recv loop

* drop sockhandle for recv loop

* Move Cancel Out of Interface Pipe Loop (#178)

* remove cancel point from inside pipe, move to fs_calls

* remove cancel point from inside pipe, move to fs_calls

* Adding mknod and fchdir system calls (#176)

* Adding Fchdir and Mknod

* Fixed Error Descriptions

* Necessary changes have been made

* Update fs_calls.rs

* Editor Problem Fixed, Comment lines added

* Created a new function 'pathnamefrominodenum'

* Update filesystem.rs

* Correct comment lines added

---------

Co-authored-by: lind <lind@nyu.edu>

* Fix/advisory unlock (#181)

* Fixed AdvisoryLock::unlock.

* Fixed formatting.

* Removed redundant if check; added comments.

* Removing mknod syscall (#184)

* Adding Fchdir and Mknod

* Fixed Error Descriptions

* Necessary changes have been made

* Update fs_calls.rs

* Editor Problem Fixed, Comment lines added

* Created a new function 'pathnamefrominodenum'

* Update filesystem.rs

* Correct comment lines added

* Update dispatcher.rs

* Update dispatcher.rs

---------

Co-authored-by: lind <lind@nyu.edu>

* Develop test getpid (#183)

* add getpid getppid test

* call the getpid test

* Add tests of fstatfs, epoll_create, epoll_ctl, and epoll_wait syscall (#182)

* Add fstatfs test

* Add fstatfs test

* Add fstatfs test

* Update fstatfs test

* Only remain fs tests

* Only remain fs tests

* Add pipe2 test

* Add epoll tests

* Update epoll test

* Only net tests

* Update epoll test

* Update epollin type

* Update epoll test

* Change EPOLLevent type

* Variable name change

* Only remain net test

* update pipe_test

* Comment epoll

* Comment epoll

* uncomment

* comment epoll

* comment ut_lind_fs_chmod

* test only simple test

* only fstatfs

* add networking test and only bind

* only net

* Modify cage creation

* Try to make creation work

* Add epoll for test

* epoll_create

* delete mut at 1516

* Uncomment all other tests

* modify open in epoll test

* try make other fs work

* make all fs test work

* try all fs test work

* make pipe test work

* Delete unrelated comment

* remove whitespace

* remove whitespace

* Add file descriptor boundary check (#190)

* first try add check

* apply check to all

* apply check to all

* change tmp to checkedfd

* Add semaphores (#191)

* add semaphore

* add semaphore

* add semaphore

* add semaphore

* add semaphore

* add semaphore

* change to loop

* copy from atomicU32

* copy from atomicU32

* copy from atomicU32

* copy from atomicU32

* copy from atomicU32

* copy from atomicU32

* test sem

* test sem

* test sem

* test sem

* test sem

* test sem

* test sem

* test sem

* test sem

* test sem

* test sem

* test sem

* test sem

* test sem

* test sem

* test sem

* test sem

* test sem

* test sem

* test sem

* test sem

* comment sem

* comment sem

* comment sem

* comment sem

* test 2 process sem

* test 2 process sem

* test 2 process sem

* test 2 process sem

* test 2 process sem

* test 2 process sem

* test 2 process sem

* test 2 process sem

* test 2 process sem

* modify sem

* modify sem

* modify sem

* modify sem

* modify sem

* modify sem

* modify sem

* modify sem

* modify sem

* modify sem

* modify sem

* modify sem

* modify sem

* modify sem

* modify sem

* shared implementation, need to debug

* fix borrowing and semantic errors

Signed-off-by: RusherRG <rushang101@gmail.com>

* shared implementation, need to debug

* fix lock

* fix lock

* fix params

* add sem_trywait/sem_timedwait

* add sem_trywait/sem_timedwait

* test sem_trywait/timedwait

* fix references

* fix references

* test sem_trywait/timedwait

* fix address option

* test sem_trywait/timedwait

* test sem_trywait

* test para

* test para

* test para

* test para

* test para

* test para

* test para

* test para

* test para

* fix errno test

* fix errno test

* test add value check

* test add value check

* test add value check

* test sem_post

* test sem_post

* test sem_post

* test sem_post

* test sem_post

* test sem

* test sem

* test sem

* test sem

* test sem

* fix: copy semaphore table to child cage even when pshared is zero

Signed-off-by: RusherRG <rushang101@gmail.com>

* refactor: remove use of enumerate

Signed-off-by: RusherRG <rushang101@gmail.com>

---------

Signed-off-by: RusherRG <rushang101@gmail.com>
Co-authored-by: Yaxuan-w <wenyaxuan0925@outlook.com>
Co-authored-by: RusherRG <rushang101@gmail.com>

* Refactor implementation of RustSemaphore (#192)

* fix: refactor the implementation of RustSemaphore to use Mutex<u32> instead of Atomicu32

Signed-off-by: RusherRG <rushang101@gmail.com>

* refactor: use if/else instead of return/break

Signed-off-by: RusherRG <rushang101@gmail.com>

* chore: add comments to struct RustSemaphore

Signed-off-by: RusherRG <rushang101@gmail.com>

---------

Signed-off-by: RusherRG <rushang101@gmail.com>

* fix: break the loop in RustSemaphore.lock() (#193)

Signed-off-by: RusherRG <rushang101@gmail.com>

* fix fork deadlock (#194)

* Semaphore clone for threads (#195)

* clone semaphores for threaded access

* clone semaphores for threaded access

* Modify a argument of dup2_helper and dup syscalls (#196)

* change the argument of dup2_helper

* fix: remove drop filedesc_enum

Signed-off-by: RusherRG <rushang101@gmail.com>

* update

* changes for the comments

* fix typo

---------

Signed-off-by: RusherRG <rushang101@gmail.com>
Co-authored-by: RusherRG <rushang101@gmail.com>

* Clearing /tmp on init and finalize (#199)

* adding tmp dir

* fix cagetable ref

* fix cagetable ref

* fix cagetable ref

* fix cagetable ref

* fix cagetable ref

* moving clear cage table after cleartmp in lindrustfinalize

* adding tmp test

* cleaning

* removing space

* changes

* changes

* removing space

* cleaning imports

---------

Co-authored-by: lind <lind@nyu.edu>
Co-authored-by: Nicholas Renner <nicholassrenner@gmail.com>

* Adding fdatasync and fsync system calls (#200)

* Fsync implementation

* Deleting Useless Files

* Little Changes about Comment Lines

* Adding fdatasync

* Delete unnecessary files

* Delete gen_netdevs

---------

Co-authored-by: lind <lind@nyu.edu>

* Adding sync_file_range Syscall (#203)

* Fsync implementation

* Deleting Useless Files

* Little Changes about Comment Lines

* Adding fdatasync

* Delete unnecessary files

* Delete gen_netdevs

* Adding sync_file_range

* Change as an off_t

* Necessary changes for sync_file_range

* Last Changes

* Update file.rs

* Update file.rs

* Fixing Error Handling

* Changes for Error Handling

* Remove Unnecessary Variables in Error Handling

* Implementing from_discriminant

* Update fs_calls.rs

---------

Co-authored-by: lind <lind@nyu.edu>

* fix concurency of semaphores in fork (#204)

* Fix Open TOCCTOU and Log Inode Tracking (#205)

* refactor open

* refactor open

* fix fd type

* fix fd type

* fix fd type

* fix fd type

* fix fd type

* fix: init FS_METADATA.nextinode value to the max inode number

Signed-off-by: lind <lind@nyu.edu>

* fix: init max_inodenum and rust_max import

Signed-off-by: lind <lind@nyu.edu>

---------

Signed-off-by: lind <lind@nyu.edu>
Co-authored-by: RusherRG <rushang101@gmail.com>

* Signal domsock (#207)

* saving

* before switch to develop

* Remove redundant code for alarm

* Make interval timer work for exec syscall

* some changes for ipc debugging

* Add and remove comments

* update close

* lines in ipc_test

* accept change

* accept

* changes

* fixes for ipc_tests to pass

* getting rid of print lines

* changes that let nbuds and unixgetsockname tests work

* Add Sigprocmask Syscall (#168)

* Add sigprocmask syscall

* Fix 'how' numbers and return type

* Make new processes inherit the sigset

* Make SigactionStruct.sa_mask u64

* Add sigsetops and create SigsetType type alias for u64

* Remove and fix stale code

* Add comments

* Implement SIGCHLD and SIGPIPE (#169)

* Add SIGCHLD and SIGPIPE implementation

* Minor refactor

* Rename kill_inner to lind_kill

* Define signal numbers as constants

* add pending signal functions

* add pending signal functions

---------

Co-authored-by: Nicholas Renner <nicholassrenner@gmail.com>

* update id mechanism

* some changes

* changes

* more changes

* fixing error

* cleaning

* cleaning

* cleaning

* cleaning

* fix fork hanging

* weird

* update pending signal for threads

* changes

* test bool

* test bool

* fixed warnings and scud2

* Added fixes for signal dispatch

* check in hash set

* fixes

* cleaning

* cleaning

* cleaning

* cleaning

* cleaning

* adding socketpair test

* manually merging coulson's changes

* push

* fix recv loop

* recv loop for udp

* drop sockhandle for recv loop

* fixing net_calls for networking tests

* getting rid of commented stuff

* recv common read locks

* recv common read locks

* before merge

* refactor recv

* pulling out of loop

* if lets to unwraps

* fix shutdown

* removing warnings

* spacing fixes

* comments

* PIPE_CAPACITY TO UDSOCK_CAPACITY

* cleaning and comments

* if statement to match

* removing weird spaces and uncommenting things

* fixing weird indenting

* weird commented line and extra spaces removed

* more cleaning

* add pending signals for sigprocmask

* add pending signals for sigprocmask

* add pending signals for sigprocmask

* add pending signals for sigprocmask

* add pending signals for sigprocmask

* return to program if signal blocked

* add signal flag

* remove signal flag

* fix sigaction

* fix sigaction

* fix sigaction

* update refactor

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* add back in signal flag

* add test flag

* add back in signal flag

* add back in signal flag

* fixing PR issues

* fixing typo

* update

* fixing "the bug"

* fix

* swap error order

* sigkill fixes

* sigkill fixes

* sigkill fixes

* fix fork deadlock

* merge develop

* merge develop

* change the oldfd of dup2_helper into filedesc_enum

* remove extra TEST variable initialization

Signed-off-by: lind <lind@nyu.edu>

* add listen case for domain socket select, fix blocking error in connect

* fix merge conflicts

Signed-off-by: RusherRG <rushang101@gmail.com>

* update select listen uds

* update select listen uds

* update

* update

* update

* update

* update

* update

* update

* update

* update

* rm closed fds from epoll

* rm closed fds from epoll

* change test name

* change test name, comments

* fix warning

* add comments, fix TEST variable

* fix ipc tests

* fix ipc tests

* fix ipc tests

* update

* update

* fix constants

* more comments

* add cage checks

* add cage checks

* add cage checks

* add cage checks

* add cage checks

* optimized select by removing hashmaps

* using bitmaps in poll

* fix type

* small fix

* comment out select test

* update

* update

* not done need to see better

* checking

* checking

* almost

* changes

* changes

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* fix PR comments

* update

* Hashset to bitmap (#201)

* optimized select by removing hashmaps

* using bitmaps in poll

* fix type

* small fix

* comment out select test

* update

* update

* not done need to see better

* checking

* checking

* almost

* changes

* changes

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* fix PR comments

* update

---------

Co-authored-by: lind <lind@nyu.edu>

* merge

* merge

* update

* update

* Hashset to bitmap (#202)

* update

* select read from old fds, edit on new fds

* update fd_set_new_copy

* ptr::copy specify types

* add assertion for debug

* still debugging

* debuging

* debugging

* debugging

* select work on empty fdsets

* refactor fd_set_copy and cleanup

* more cleanup for select

---------

Co-authored-by: Yizhuo Liang <yizhuo.liang.hello@gmail.com>

* tls pending skeleton

* tls pending skeleton

* tls pending skeleton

* tls pending skeleton

* fix merge conflict

* make select use read locks

* poll/select performance improvements

* poll/select performance improvements

* fix warnings

* pending connection try 2

* pending connection try 2

* pending connection try 2

* pending connection try 2

* pending connection try 2

* pending connection try 2

* pending connection try 2

* pending connection try 2

* pending connection try 2

* fix listen

* fix listen

* fix listen

* fix listen

* change back to tuple

* change back to tuple

* change back to tuple

* fix test

* unix address type fix

* unix address type fix

---------

Signed-off-by: lind <lind@nyu.edu>
Signed-off-by: RusherRG <rushang101@gmail.com>
Co-authored-by: lind <lind@nyu.edu>
Co-authored-by: Tian(Maxwell) Yang <maxwell_yang@outlook.com>
Co-authored-by: Tian Yang <31149339+AlpacaMax@users.noreply.github.com>
Co-authored-by: jesings <34111484+jesings@users.noreply.github.com>
Co-authored-by: Yizhuo Liang <yizhuo.liang.hello@gmail.com>
Co-authored-by: RusherRG <rushang101@gmail.com>
Co-authored-by: Yizhuo Liang <70337586+yizhuoliang@users.noreply.github.com>

* Update fs_calls.rs (#208)

* read locks on select, yield (#209)

* Refine select nodelay (#211)

* rewrite FdSet and it's uses

* FdSet init from raw fd_set

* attempt to fix borrowing, kernel_select nonblocking

* attempt continued

* fix is_set

* attempt to fix borrow checking within select

* fix in-select borrow, fix warnings

* cleanup

* fix a warning

* fix serious typo

* fix typo

* debugging

* debugging

* prints

* prints!!

* debugging

* debugging

* debugging

* debugging

* debug

* debuging

* update

* debug

* debug

* debug

* debug

* debug

* cleanup and refactor

* fixing the nfds parameter for kernel select

* rawfd in socketdesc

* rawfd in socketdesc

* rawfd in socketdesc

* rawfd in socketdesc

* rawfd in socketdesc

* rawfd in socketdesc

* rawfd in socketdesc

* rawfd in socketdesc

* rawfd in socketdesc

* rawfd in socketdesc

* rawfd in socketdesc

* rawfd in socketdesc

* increase timeout

* change gettimeofday log level

* migrate FdSet, nodelay getsockopt, accept rawfd

* small fix

* store rawfd in acpt/lst/cnct, fix INPROGRESS

* fix ownership

* of course domain sockets don't have raw_sys_fd

* fix warnings

* fix warnings

* small coding style fixes

* add blank line

* add TCP level options

* getsockopt tcp without kernel

* add FdSet::clear back for tests

* fix warnings

* fix warning

* revert select sleep

* fix PR suggestions

* refactor kernel select logic

* reorganize

* update

---------

Co-authored-by: Nicholas Renner <nicholassrenner@gmail.com>

---------

Signed-off-by: RusherRG <rushang101@gmail.com>
Signed-off-by: lind <lind@nyu.edu>
Co-authored-by: Yashaswi Makula <yashaswi.makula@gmail.com>
Co-authored-by: lind <lind@nyu.edu>
Co-authored-by: jesings <34111484+jesings@users.noreply.github.com>
Co-authored-by: kuzeyardabulut <54737933+kuzeyardabulut@users.noreply.github.com>
Co-authored-by: Yaxuan-w <wenyaxuan0925@outlook.com>
Co-authored-by: RusherRG <rushang101@gmail.com>
Co-authored-by: Justin Koe <100324413+justyoyo123@users.noreply.github.com>
Co-authored-by: Tian(Maxwell) Yang <maxwell_yang@outlook.com>
Co-authored-by: Tian Yang <31149339+AlpacaMax@users.noreply.github.com>
Co-authored-by: Yizhuo Liang <yizhuo.liang.hello@gmail.com>
Co-authored-by: Yizhuo Liang <70337586+yizhuoliang@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

5 participants