[jira] [Updated] (TS-4487) Don't reschedule read depend on needs & did not check the change of lock at the return callback with wbe.
[ https://issues.apache.org/jira/browse/TS-4487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Leif Hedstrom updated TS-4487: -- Fix Version/s: 7.0.0 > Don't reschedule read depend on needs & did not check the change of lock at > the return callback with wbe. > - > > Key: TS-4487 > URL: https://issues.apache.org/jira/browse/TS-4487 > Project: Traffic Server > Issue Type: Improvement > Components: SSL >Reporter: Oknet Xu > Fix For: 7.0.0 > > > the code: > {code} > int64_t r = vc->load_buffer_and_write(towrite, wattempted, total_written, > buf, needs); > {code} > At the end of write_to_net_io, > {code} > if (!buf.reader()->read_avail()) { // should check needs==0 > write_disable(nh, vc); > return; > } > if ((needs & EVENTIO_WRITE) == EVENTIO_WRITE) { > write_reschedule(nh, vc); > } > if ((needs & EVENTIO_READ) == EVENTIO_READ) { > read_reschedule(nh, vc); > } > return; > {code} > another issue in write_to_net_io(): did not check the change of lock at the > return callback with wbe. > {code} > if (s->vio.ntodo() <= 0) { > write_signal_done(VC_EVENT_WRITE_COMPLETE, nh, vc); > return; > } else if (signalled && (wbe_event != vc->write_buffer_empty_event)) { > // @a signalled means we won't send an event, and the event values > differing means we > // had a write buffer trap and cleared it, so we need to send it now. > if (write_signal_and_update(wbe_event, vc) != EVENT_CONT) > return; > // > did not check the change of lock at the return callback > with wbe. > } else if (!signalled) { > if (write_signal_and_update(VC_EVENT_WRITE_READY, vc) != EVENT_CONT) { > return; > } > // change of lock... don't look at shared variables! > if (lock.get_mutex() != s->vio.mutex.get()) { > write_reschedule(nh, vc); > return; > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (TS-4487) Don't reschedule read depend on needs & did not check the change of lock at the return callback with wbe.
[ https://issues.apache.org/jira/browse/TS-4487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Leif Hedstrom updated TS-4487: -- Assignee: Oknet Xu > Don't reschedule read depend on needs & did not check the change of lock at > the return callback with wbe. > - > > Key: TS-4487 > URL: https://issues.apache.org/jira/browse/TS-4487 > Project: Traffic Server > Issue Type: Improvement > Components: SSL >Reporter: Oknet Xu >Assignee: Oknet Xu > Fix For: 7.0.0 > > > the code: > {code} > int64_t r = vc->load_buffer_and_write(towrite, wattempted, total_written, > buf, needs); > {code} > At the end of write_to_net_io, > {code} > if (!buf.reader()->read_avail()) { // should check needs==0 > write_disable(nh, vc); > return; > } > if ((needs & EVENTIO_WRITE) == EVENTIO_WRITE) { > write_reschedule(nh, vc); > } > if ((needs & EVENTIO_READ) == EVENTIO_READ) { > read_reschedule(nh, vc); > } > return; > {code} > another issue in write_to_net_io(): did not check the change of lock at the > return callback with wbe. > {code} > if (s->vio.ntodo() <= 0) { > write_signal_done(VC_EVENT_WRITE_COMPLETE, nh, vc); > return; > } else if (signalled && (wbe_event != vc->write_buffer_empty_event)) { > // @a signalled means we won't send an event, and the event values > differing means we > // had a write buffer trap and cleared it, so we need to send it now. > if (write_signal_and_update(wbe_event, vc) != EVENT_CONT) > return; > // > did not check the change of lock at the return callback > with wbe. > } else if (!signalled) { > if (write_signal_and_update(VC_EVENT_WRITE_READY, vc) != EVENT_CONT) { > return; > } > // change of lock... don't look at shared variables! > if (lock.get_mutex() != s->vio.mutex.get()) { > write_reschedule(nh, vc); > return; > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (TS-4487) Don't reschedule read depend on needs & did not check the change of lock at the return callback with wbe.
[ https://issues.apache.org/jira/browse/TS-4487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Oknet Xu updated TS-4487: - Summary: Don't reschedule read depend on needs & did not check the change of lock at the return callback with wbe. (was: Don't reschedule read depend on needs) > Don't reschedule read depend on needs & did not check the change of lock at > the return callback with wbe. > - > > Key: TS-4487 > URL: https://issues.apache.org/jira/browse/TS-4487 > Project: Traffic Server > Issue Type: Improvement > Components: SSL >Reporter: Oknet Xu > > the code: > {code} > int64_t r = vc->load_buffer_and_write(towrite, wattempted, total_written, > buf, needs); > {code} > At the end of write_to_net_io, > {code} > if (!buf.reader()->read_avail()) { // should check needs==0 > write_disable(nh, vc); > return; > } > if ((needs & EVENTIO_WRITE) == EVENTIO_WRITE) { > write_reschedule(nh, vc); > } > if ((needs & EVENTIO_READ) == EVENTIO_READ) { > read_reschedule(nh, vc); > } > return; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (TS-4487) Don't reschedule read depend on needs
[ https://issues.apache.org/jira/browse/TS-4487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Oknet Xu updated TS-4487: - Description: the code: {code} int64_t r = vc->load_buffer_and_write(towrite, wattempted, total_written, buf, needs); {code} At the end of write_to_net_io, {code} if (!buf.reader()->read_avail()) { // should check needs==0 write_disable(nh, vc); return; } if ((needs & EVENTIO_WRITE) == EVENTIO_WRITE) { write_reschedule(nh, vc); } if ((needs & EVENTIO_READ) == EVENTIO_READ) { read_reschedule(nh, vc); } return; {code} was: the code: {code} int64_t r = vc->load_buffer_and_write(towrite, wattempted, total_written, buf, needs); {code} At the end of write_to_net_io, {code} if (!buf.reader()->read_avail()) { // should check needs==0 write_disable(nh, vc); return; } if ((needs & EVENTIO_WRITE) == EVENTIO_WRITE) { write_reschedule(nh, vc); } // here r>0, don't need to check the needs. if ((needs & EVENTIO_READ) == EVENTIO_READ) { read_reschedule(nh, vc); } return; {code} > Don't reschedule read depend on needs > - > > Key: TS-4487 > URL: https://issues.apache.org/jira/browse/TS-4487 > Project: Traffic Server > Issue Type: Improvement > Components: SSL >Reporter: Oknet Xu > > the code: > {code} > int64_t r = vc->load_buffer_and_write(towrite, wattempted, total_written, > buf, needs); > {code} > At the end of write_to_net_io, > {code} > if (!buf.reader()->read_avail()) { // should check needs==0 > write_disable(nh, vc); > return; > } > if ((needs & EVENTIO_WRITE) == EVENTIO_WRITE) { > write_reschedule(nh, vc); > } > if ((needs & EVENTIO_READ) == EVENTIO_READ) { > read_reschedule(nh, vc); > } > return; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (TS-4487) Don't reschedule read depend on needs
[ https://issues.apache.org/jira/browse/TS-4487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Oknet Xu updated TS-4487: - Description: the code: {code} int64_t r = vc->load_buffer_and_write(towrite, wattempted, total_written, buf, needs); {code} At the end of write_to_net_io, {code} if (!buf.reader()->read_avail()) { // should check needs==0 write_disable(nh, vc); return; } if ((needs & EVENTIO_WRITE) == EVENTIO_WRITE) { write_reschedule(nh, vc); } // here r>0, don't need to check the needs. if ((needs & EVENTIO_READ) == EVENTIO_READ) { read_reschedule(nh, vc); } return; {code} was: the code: {code} int64_t r = vc->load_buffer_and_write(towrite, wattempted, total_written, buf, needs); {code} In the SSLNetVConnection::load_buffer_and_write(), only set needs |= EVENTIO_WRITE on r>0. At the end of write_to_net_io, {code} if (!buf.reader()->read_avail()) { write_disable(nh, vc); return; } if ((needs & EVENTIO_WRITE) == EVENTIO_WRITE) { write_reschedule(nh, vc); } // here r>0, don't need to check the needs. if ((needs & EVENTIO_READ) == EVENTIO_READ) { read_reschedule(nh, vc); } return; {code} > Don't reschedule read depend on needs > - > > Key: TS-4487 > URL: https://issues.apache.org/jira/browse/TS-4487 > Project: Traffic Server > Issue Type: Improvement > Components: SSL >Reporter: Oknet Xu > > the code: > {code} > int64_t r = vc->load_buffer_and_write(towrite, wattempted, total_written, > buf, needs); > {code} > At the end of write_to_net_io, > {code} > if (!buf.reader()->read_avail()) { // should check needs==0 > write_disable(nh, vc); > return; > } > if ((needs & EVENTIO_WRITE) == EVENTIO_WRITE) { > write_reschedule(nh, vc); > } > // here r>0, don't need to check the needs. > if ((needs & EVENTIO_READ) == EVENTIO_READ) { > read_reschedule(nh, vc); > } > return; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (TS-4487) Don't reschedule read depend on needs
[ https://issues.apache.org/jira/browse/TS-4487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Oknet Xu updated TS-4487: - Summary: Don't reschedule read depend on needs (was: Don't need reschedule read depend on needs) > Don't reschedule read depend on needs > - > > Key: TS-4487 > URL: https://issues.apache.org/jira/browse/TS-4487 > Project: Traffic Server > Issue Type: Improvement > Components: SSL >Reporter: Oknet Xu > > the code: > {code} > int64_t r = vc->load_buffer_and_write(towrite, wattempted, total_written, > buf, needs); > {code} > In the SSLNetVConnection::load_buffer_and_write(), only set needs |= > EVENTIO_WRITE on r>0. > At the end of write_to_net_io, > {code} > if (!buf.reader()->read_avail()) { > write_disable(nh, vc); > return; > } > if ((needs & EVENTIO_WRITE) == EVENTIO_WRITE) { > write_reschedule(nh, vc); > } > // here r>0, don't need to check the needs. > if ((needs & EVENTIO_READ) == EVENTIO_READ) { > read_reschedule(nh, vc); > } > return; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (TS-4487) Don't reschedule read depend on needs while write buffer empty
[ https://issues.apache.org/jira/browse/TS-4487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Oknet Xu updated TS-4487: - Description: the code: {code} int64_t r = vc->load_buffer_and_write(towrite, wattempted, total_written, buf, needs); {code} In the SSLNetVConnection::load_buffer_and_write(), only set needs |= EVENTIO_WRITE on r>0. At the end of write_to_net_io, {code} if (!buf.reader()->read_avail()) { write_disable(nh, vc); return; <-- return from here, but don't reschedule read } if ((needs & EVENTIO_WRITE) == EVENTIO_WRITE) { write_reschedule(nh, vc); } if ((needs & EVENTIO_READ) == EVENTIO_READ) { read_reschedule(nh, vc); } return; {code} was: At the end of write_to_net_io {code} if (!buf.reader()->read_avail()) { write_disable(nh, vc); return; <-- return from here, but don't reschedule read } if ((needs & EVENTIO_WRITE) == EVENTIO_WRITE) { write_reschedule(nh, vc); } if ((needs & EVENTIO_READ) == EVENTIO_READ) { read_reschedule(nh, vc); } return; {code} > Don't reschedule read depend on needs while write buffer empty > -- > > Key: TS-4487 > URL: https://issues.apache.org/jira/browse/TS-4487 > Project: Traffic Server > Issue Type: Bug > Components: SSL >Reporter: Oknet Xu > > the code: > {code} > int64_t r = vc->load_buffer_and_write(towrite, wattempted, total_written, > buf, needs); > {code} > In the SSLNetVConnection::load_buffer_and_write(), only set needs |= > EVENTIO_WRITE on r>0. > At the end of write_to_net_io, > {code} > if (!buf.reader()->read_avail()) { > write_disable(nh, vc); > return; <-- return from here, but don't reschedule read > } > if ((needs & EVENTIO_WRITE) == EVENTIO_WRITE) { > write_reschedule(nh, vc); > } > if ((needs & EVENTIO_READ) == EVENTIO_READ) { > read_reschedule(nh, vc); > } > return; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)