From b36239ef06c3d48978251e92133e77394f8f8670 Mon Sep 17 00:00:00 2001 From: Mr NeilBrown Date: Tue, 7 Jan 2020 13:14:51 -0500 Subject: [PATCH] LU-13005 lnet: discard LNetEQGet and LNetEQWait These interfaces are never used and are not particularly useful, so discard them. Test-Parameters: trivial testlist=sanity-lnet Signed-off-by: Mr NeilBrown Change-Id: Iaf2bc9ec2638820c3e4334e40cf2cf6993237f7d Reviewed-on: https://review.whamcloud.com/36840 Tested-by: jenkins Reviewed-by: Serguei Smirnov Reviewed-by: James Simmons Tested-by: Maloo Reviewed-by: Oleg Drokin --- lnet/include/lnet/api.h | 16 +++--------- lnet/lnet/lib-eq.c | 66 ++++++------------------------------------------- 2 files changed, 11 insertions(+), 71 deletions(-) diff --git a/lnet/include/lnet/api.h b/lnet/include/lnet/api.h index 679da9e..6ba7cac 100644 --- a/lnet/include/lnet/api.h +++ b/lnet/include/lnet/api.h @@ -145,12 +145,10 @@ int LNetMDUnlink(struct lnet_handle_md md_in); * that can be stored in an EQ. The struct lnet_event defines a structure that * holds the information about with an event. * - * There are five functions for dealing with EQs: LNetEQAlloc() is used to - * create an EQ and allocate the resources needed, while LNetEQFree() - * releases these resources and free the EQ. LNetEQGet() retrieves the next - * event from an EQ, and LNetEQWait() can be used to block a process until - * an EQ has at least one event. LNetEQPoll() can be used to test or wait - * on multiple EQs. + * There are three functions for dealing with EQs: LNetEQAlloc() is used + * to create an EQ and allocate the resources needed, while LNetEQFree() + * releases these resources and free the EQ. LNetEQPoll() can be used + * to test or wait on multiple EQs. * @{ */ int LNetEQAlloc(unsigned int count_in, lnet_eq_handler_t handler, @@ -158,12 +156,6 @@ int LNetEQAlloc(unsigned int count_in, int LNetEQFree(struct lnet_handle_eq eventq_in); -int LNetEQGet(struct lnet_handle_eq eventq_in, - struct lnet_event *event_out); - -int LNetEQWait(struct lnet_handle_eq eventq_in, - struct lnet_event *event_out); - int LNetEQPoll(struct lnet_handle_eq *eventqs_in, int neq_in, signed long timeout, diff --git a/lnet/lnet/lib-eq.c b/lnet/lnet/lib-eq.c index f5f2569..6a68e5f 100644 --- a/lnet/lnet/lib-eq.c +++ b/lnet/lnet/lib-eq.c @@ -40,13 +40,13 @@ /** * Create an event queue that has room for \a count number of events. * - * The event queue is circular and older events will be overwritten by new - * ones if they are not removed in time by the user using the functions - * LNetEQGet(), LNetEQWait(), or LNetEQPoll(). It is up to the user to - * determine the appropriate size of the event queue to prevent this loss - * of events. Note that when EQ handler is specified in \a callback, no - * event loss can happen, since the handler is run for each event deposited - * into the EQ. + * The event queue is circular and older events will be overwritten by + * new ones if they are not removed in time by the user using the + * function LNetEQPoll(). It is up to the user to determine the + * appropriate size of the event queue to prevent this loss of events. + * Note that when EQ handler is specified in \a callback, no event loss + * can happen, since the handler is run for each event deposited into + * the EQ. * * \param count The number of events to be stored in the event queue. It * will be rounded up to the next power of two. @@ -264,58 +264,6 @@ lnet_eq_dequeue_event(struct lnet_eq *eq, struct lnet_event *ev) RETURN(rc); } -/** - * A nonblocking function that can be used to get the next event in an EQ. - * If an event handler is associated with the EQ, the handler will run before - * this function returns successfully. The event is removed from the queue. - * - * \param eventq A handle for the event queue. - * \param event On successful return (1 or -EOVERFLOW), this location will - * hold the next event in the EQ. - * - * \retval 0 No pending event in the EQ. - * \retval 1 Indicates success. - * \retval -ENOENT If \a eventq does not point to a valid EQ. - * \retval -EOVERFLOW Indicates success (i.e., an event is returned) and that - * at least one event between this event and the last event obtained from the - * EQ has been dropped due to limited space in the EQ. - */ -int -LNetEQGet(struct lnet_handle_eq eventq, struct lnet_event *event) -{ - int which; - - return LNetEQPoll(&eventq, 1, 0, - event, &which); -} -EXPORT_SYMBOL(LNetEQGet); - -/** - * Block the calling process until there is an event in the EQ. - * If an event handler is associated with the EQ, the handler will run before - * this function returns successfully. This function returns the next event - * in the EQ and removes it from the EQ. - * - * \param eventq A handle for the event queue. - * \param event On successful return (1 or -EOVERFLOW), this location will - * hold the next event in the EQ. - * - * \retval 1 Indicates success. - * \retval -ENOENT If \a eventq does not point to a valid EQ. - * \retval -EOVERFLOW Indicates success (i.e., an event is returned) and that - * at least one event between this event and the last event obtained from the - * EQ has been dropped due to limited space in the EQ. - */ -int -LNetEQWait(struct lnet_handle_eq eventq, struct lnet_event *event) -{ - int which; - - return LNetEQPoll(&eventq, 1, MAX_SCHEDULE_TIMEOUT, - event, &which); -} -EXPORT_SYMBOL(LNetEQWait); - static int lnet_eq_wait_locked(signed long *timeout) __must_hold(&the_lnet.ln_eq_wait_lock) -- 1.8.3.1