Whamcloud - gitweb
LU-7236 ptlrpc: idle connections can disconnect
[fs/lustre-release.git] / lustre / ptlrpc / pinger.c
1 /*
2  * GPL HEADER START
3  *
4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 only,
8  * as published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * General Public License version 2 for more details (a copy is included
14  * in the LICENSE file that accompanied this code).
15  *
16  * You should have received a copy of the GNU General Public License
17  * version 2 along with this program; If not, see
18  * http://www.gnu.org/licenses/gpl-2.0.html
19  *
20  * GPL HEADER END
21  */
22 /*
23  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
24  * Use is subject to license terms.
25  *
26  * Copyright (c) 2011, 2015, Intel Corporation.
27  */
28 /*
29  * This file is part of Lustre, http://www.lustre.org/
30  * Lustre is a trademark of Sun Microsystems, Inc.
31  *
32  * lustre/ptlrpc/pinger.c
33  *
34  * Portal-RPC reconnection and replay operations, for use in recovery.
35  */
36
37 #define DEBUG_SUBSYSTEM S_RPC
38
39 #include <linux/kthread.h>
40 #include <linux/workqueue.h>
41 #include <obd_support.h>
42 #include <obd_class.h>
43 #include "ptlrpc_internal.h"
44
45 static int suppress_pings;
46 module_param(suppress_pings, int, 0644);
47 MODULE_PARM_DESC(suppress_pings, "Suppress pings");
48
49 struct mutex pinger_mutex;
50 static struct list_head pinger_imports =
51                 LIST_HEAD_INIT(pinger_imports);
52 static struct list_head timeout_list =
53                 LIST_HEAD_INIT(timeout_list);
54
55 int ptlrpc_pinger_suppress_pings()
56 {
57         return suppress_pings;
58 }
59 EXPORT_SYMBOL(ptlrpc_pinger_suppress_pings);
60
61 struct ptlrpc_request *
62 ptlrpc_prep_ping(struct obd_import *imp)
63 {
64         struct ptlrpc_request *req;
65
66         req = ptlrpc_request_alloc_pack(imp, &RQF_OBD_PING,
67                                         LUSTRE_OBD_VERSION, OBD_PING);
68         if (req) {
69                 ptlrpc_request_set_replen(req);
70                 req->rq_no_resend = req->rq_no_delay = 1;
71         }
72         return req;
73 }
74
75 int ptlrpc_obd_ping(struct obd_device *obd)
76 {
77         int rc;
78         struct ptlrpc_request *req;
79         ENTRY;
80
81         req = ptlrpc_prep_ping(obd->u.cli.cl_import);
82         if (req == NULL)
83                 RETURN(-ENOMEM);
84
85         req->rq_send_state = LUSTRE_IMP_FULL;
86
87         rc = ptlrpc_queue_wait(req);
88
89         ptlrpc_req_finished(req);
90
91         RETURN(rc);
92 }
93 EXPORT_SYMBOL(ptlrpc_obd_ping);
94
95 static bool ptlrpc_check_import_is_idle(struct obd_import *imp)
96 {
97         struct ldlm_namespace *ns = imp->imp_obd->obd_namespace;
98         time64_t now;
99
100         if (!imp->imp_idle_timeout)
101                 return false;
102         /* 4 comes from:
103          *  - client_obd_setup() - hashed import
104          *  - ptlrpcd_alloc_work()
105          *  - ptlrpcd_alloc_work()
106          *  - ptlrpc_pinger_add_import
107          */
108         if (atomic_read(&imp->imp_refcount) > 4)
109                 return false;
110         /* any lock increases ns_bref being a resource holder */
111         if (ns && atomic_read(&ns->ns_bref) > 0)
112                 return false;
113
114         now = ktime_get_real_seconds();
115         if (now - imp->imp_last_reply_time < imp->imp_idle_timeout)
116                 return false;
117
118         return true;
119 }
120
121 static int ptlrpc_ping(struct obd_import *imp)
122 {
123         struct ptlrpc_request   *req;
124         ENTRY;
125
126         if (ptlrpc_check_import_is_idle(imp))
127                 RETURN(ptlrpc_disconnect_and_idle_import(imp));
128
129         req = ptlrpc_prep_ping(imp);
130         if (req == NULL) {
131                 CERROR("OOM trying to ping %s->%s\n",
132                        imp->imp_obd->obd_uuid.uuid,
133                        obd2cli_tgt(imp->imp_obd));
134                 RETURN(-ENOMEM);
135         }
136
137         DEBUG_REQ(D_INFO, req, "pinging %s->%s",
138                   imp->imp_obd->obd_uuid.uuid, obd2cli_tgt(imp->imp_obd));
139         ptlrpcd_add_req(req);
140
141         RETURN(0);
142 }
143
144 static void ptlrpc_update_next_ping(struct obd_import *imp, int soon)
145 {
146 #ifdef ENABLE_PINGER
147         time64_t time = soon ? PING_INTERVAL_SHORT : PING_INTERVAL;
148
149         if (imp->imp_state == LUSTRE_IMP_DISCON) {
150                 time64_t dtime = max_t(time64_t, CONNECTION_SWITCH_MIN,
151                                        AT_OFF ? 0 :
152                                        at_get(&imp->imp_at.iat_net_latency));
153                 time = min(time, dtime);
154         }
155         imp->imp_next_ping = ktime_get_seconds() + time;
156 #endif /* ENABLE_PINGER */
157 }
158
159 void ptlrpc_ping_import_soon(struct obd_import *imp)
160 {
161         imp->imp_next_ping = ktime_get_seconds();
162 }
163
164 static inline int imp_is_deactive(struct obd_import *imp)
165 {
166         return (imp->imp_deactive ||
167                 OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_IMP_DEACTIVE));
168 }
169
170 static inline time64_t ptlrpc_next_reconnect(struct obd_import *imp)
171 {
172         if (imp->imp_server_timeout)
173                 return ktime_get_seconds() + (obd_timeout >> 1);
174         else
175                 return ktime_get_seconds() + obd_timeout;
176 }
177
178 static time64_t pinger_check_timeout(time64_t time)
179 {
180         struct timeout_item *item;
181         time64_t timeout = PING_INTERVAL;
182
183         /* This list is sorted in increasing timeout order */
184         mutex_lock(&pinger_mutex);
185         list_for_each_entry(item, &timeout_list, ti_chain) {
186                 time64_t ti_timeout = item->ti_timeout;
187
188                 if (timeout > ti_timeout)
189                         timeout = ti_timeout;
190                 break;
191         }
192         mutex_unlock(&pinger_mutex);
193
194         return time + timeout - ktime_get_seconds();
195 }
196
197 static bool ir_up;
198
199 void ptlrpc_pinger_ir_up(void)
200 {
201         CDEBUG(D_HA, "IR up\n");
202         ir_up = true;
203 }
204 EXPORT_SYMBOL(ptlrpc_pinger_ir_up);
205
206 void ptlrpc_pinger_ir_down(void)
207 {
208         CDEBUG(D_HA, "IR down\n");
209         ir_up = false;
210 }
211 EXPORT_SYMBOL(ptlrpc_pinger_ir_down);
212
213 static void ptlrpc_pinger_process_import(struct obd_import *imp,
214                                          time64_t this_ping)
215 {
216         int level;
217         int force;
218         int force_next;
219         int suppress;
220
221         spin_lock(&imp->imp_lock);
222
223         level = imp->imp_state;
224         force = imp->imp_force_verify;
225         force_next = imp->imp_force_next_verify;
226         /*
227          * This will be used below only if the import is "FULL".
228          */
229         suppress = ir_up && OCD_HAS_FLAG(&imp->imp_connect_data, PINGLESS);
230
231         imp->imp_force_verify = 0;
232
233         if (imp->imp_next_ping - 5 >= this_ping && !force) {
234                 spin_unlock(&imp->imp_lock);
235                 return;
236         }
237
238         imp->imp_force_next_verify = 0;
239
240         spin_unlock(&imp->imp_lock);
241
242         CDEBUG(level == LUSTRE_IMP_FULL ? D_INFO : D_HA, "%s->%s: level %s/%u "
243                "force %u force_next %u deactive %u pingable %u suppress %u\n",
244                imp->imp_obd->obd_uuid.uuid, obd2cli_tgt(imp->imp_obd),
245                ptlrpc_import_state_name(level), level, force, force_next,
246                imp->imp_deactive, imp->imp_pingable, suppress);
247
248         if (level == LUSTRE_IMP_DISCON && !imp_is_deactive(imp)) {
249                 /* wait for a while before trying recovery again */
250                 imp->imp_next_ping = ptlrpc_next_reconnect(imp);
251                 if (!imp->imp_no_pinger_recover)
252                         ptlrpc_initiate_recovery(imp);
253         } else if (level != LUSTRE_IMP_FULL ||
254                    imp->imp_obd->obd_no_recov ||
255                    imp_is_deactive(imp)) {
256                 CDEBUG(D_HA, "%s->%s: not pinging (in recovery "
257                        "or recovery disabled: %s)\n",
258                        imp->imp_obd->obd_uuid.uuid, obd2cli_tgt(imp->imp_obd),
259                        ptlrpc_import_state_name(level));
260                 if (force) {
261                         spin_lock(&imp->imp_lock);
262                         imp->imp_force_verify = 1;
263                         spin_unlock(&imp->imp_lock);
264                 }
265         } else if ((imp->imp_pingable && !suppress) || force_next || force) {
266                 ptlrpc_ping(imp);
267         }
268 }
269
270 static struct workqueue_struct *pinger_wq;
271 static void ptlrpc_pinger_main(struct work_struct *ws);
272 static DECLARE_DELAYED_WORK(ping_work, ptlrpc_pinger_main);
273
274 static void ptlrpc_pinger_main(struct work_struct *ws)
275 {
276         time64_t this_ping = ktime_get_seconds();
277         time64_t time_to_next_wake;
278         struct timeout_item *item;
279         struct obd_import *imp;
280         struct list_head *iter;
281
282         do {
283                 mutex_lock(&pinger_mutex);
284                 list_for_each_entry(item, &timeout_list, ti_chain)
285                         item->ti_cb(item, item->ti_cb_data);
286
287                 list_for_each(iter, &pinger_imports) {
288                         imp = list_entry(iter, struct obd_import,
289                                          imp_pinger_chain);
290
291                         ptlrpc_pinger_process_import(imp, this_ping);
292                         /* obd_timeout might have changed */
293                         if (imp->imp_pingable && imp->imp_next_ping &&
294                             imp->imp_next_ping > this_ping + PING_INTERVAL)
295                                 ptlrpc_update_next_ping(imp, 0);
296                 }
297                 mutex_unlock(&pinger_mutex);
298                 /* update memory usage info */
299                 obd_update_maxusage();
300
301                 /* Wait until the next ping time, or until we're stopped. */
302                 time_to_next_wake = pinger_check_timeout(this_ping);
303                 /* The ping sent by ptlrpc_send_rpc may get sent out
304                  * say .01 second after this.
305                  * ptlrpc_pinger_sending_on_import will then set the
306                  * next ping time to next_ping + .01 sec, which means
307                  * we will SKIP the next ping at next_ping, and the
308                  * ping will get sent 2 timeouts from now!  Beware. */
309                 CDEBUG(D_INFO, "next wakeup in %lld (%lld)\n",
310                        time_to_next_wake, this_ping + PING_INTERVAL);
311         } while (time_to_next_wake <= 0);
312
313         queue_delayed_work(pinger_wq, &ping_work,
314                            cfs_time_seconds(max(time_to_next_wake, 1LL)));
315 }
316
317 int ptlrpc_start_pinger(void)
318 {
319 #ifdef ENABLE_PINGER
320         if (pinger_wq)
321                 return -EALREADY;
322
323         pinger_wq = alloc_workqueue("ptlrpc_pinger", 0, 1);
324         if (!pinger_wq) {
325                 CERROR("cannot start pinger workqueue\n");
326                 return -ENOMEM;
327         }
328
329         queue_delayed_work(pinger_wq, &ping_work, 0);
330
331         if (suppress_pings)
332                 CWARN("Pings will be suppressed at the request of the "
333                       "administrator.  The configuration shall meet the "
334                       "additional requirements described in the manual.  "
335                       "(Search for the \"suppress_pings\" kernel module "
336                       "parameter.)\n");
337 #endif
338         return 0;
339 }
340
341 int ptlrpc_pinger_remove_timeouts(void);
342
343 int ptlrpc_stop_pinger(void)
344 {
345 #ifdef ENABLE_PINGER
346         if (!pinger_wq)
347                 return -EALREADY;
348
349         ptlrpc_pinger_remove_timeouts();
350
351         cancel_delayed_work_sync(&ping_work);
352         destroy_workqueue(pinger_wq);
353         pinger_wq = NULL;
354 #endif
355         return 0;
356 }
357
358 void ptlrpc_pinger_sending_on_import(struct obd_import *imp)
359 {
360         ptlrpc_update_next_ping(imp, 0);
361 }
362
363 void ptlrpc_pinger_commit_expected(struct obd_import *imp)
364 {
365         ptlrpc_update_next_ping(imp, 1);
366         assert_spin_locked(&imp->imp_lock);
367         /*
368          * Avoid reading stale imp_connect_data.  When not sure if pings are
369          * expected or not on next connection, we assume they are not and force
370          * one anyway to guarantee the chance of updating
371          * imp_peer_committed_transno.
372          */
373         if (imp->imp_state != LUSTRE_IMP_FULL ||
374             OCD_HAS_FLAG(&imp->imp_connect_data, PINGLESS))
375                 imp->imp_force_next_verify = 1;
376 }
377
378 int ptlrpc_pinger_add_import(struct obd_import *imp)
379 {
380         ENTRY;
381         if (!list_empty(&imp->imp_pinger_chain))
382                 RETURN(-EALREADY);
383
384         mutex_lock(&pinger_mutex);
385         CDEBUG(D_HA, "adding pingable import %s->%s\n",
386                imp->imp_obd->obd_uuid.uuid, obd2cli_tgt(imp->imp_obd));
387         /* if we add to pinger we want recovery on this import */
388         imp->imp_obd->obd_no_recov = 0;
389         ptlrpc_update_next_ping(imp, 0);
390         /* XXX sort, blah blah */
391         list_add_tail(&imp->imp_pinger_chain, &pinger_imports);
392         class_import_get(imp);
393
394         ptlrpc_pinger_wake_up();
395         mutex_unlock(&pinger_mutex);
396
397         RETURN(0);
398 }
399 EXPORT_SYMBOL(ptlrpc_pinger_add_import);
400
401 int ptlrpc_pinger_del_import(struct obd_import *imp)
402 {
403         ENTRY;
404
405         if (list_empty(&imp->imp_pinger_chain))
406                 RETURN(-ENOENT);
407
408         mutex_lock(&pinger_mutex);
409         list_del_init(&imp->imp_pinger_chain);
410         CDEBUG(D_HA, "removing pingable import %s->%s\n",
411                imp->imp_obd->obd_uuid.uuid, obd2cli_tgt(imp->imp_obd));
412         /* if we remove from pinger we don't want recovery on this import */
413         imp->imp_obd->obd_no_recov = 1;
414         class_import_put(imp);
415         mutex_unlock(&pinger_mutex);
416         RETURN(0);
417 }
418 EXPORT_SYMBOL(ptlrpc_pinger_del_import);
419
420 /**
421  * Register a timeout callback to the pinger list, and the callback will
422  * be called when timeout happens.
423  */
424 static struct timeout_item *ptlrpc_new_timeout(time64_t time,
425                                                enum timeout_event event,
426                                                timeout_cb_t cb, void *data)
427 {
428         struct timeout_item *ti;
429
430         OBD_ALLOC_PTR(ti);
431         if (!ti)
432                 return(NULL);
433
434         INIT_LIST_HEAD(&ti->ti_obd_list);
435         INIT_LIST_HEAD(&ti->ti_chain);
436         ti->ti_timeout = time;
437         ti->ti_event = event;
438         ti->ti_cb = cb;
439         ti->ti_cb_data = data;
440
441         return ti;
442 }
443
444 /**
445  * Register timeout event on the the pinger thread.
446  * Note: the timeout list is an sorted list with increased timeout value.
447  */
448 static struct timeout_item*
449 ptlrpc_pinger_register_timeout(time64_t time, enum timeout_event event,
450                                timeout_cb_t cb, void *data)
451 {
452         struct timeout_item *item, *tmp;
453
454         LASSERT(mutex_is_locked(&pinger_mutex));
455
456         list_for_each_entry(item, &timeout_list, ti_chain)
457                 if (item->ti_event == event)
458                         goto out;
459
460         item = ptlrpc_new_timeout(time, event, cb, data);
461         if (item) {
462                 list_for_each_entry_reverse(tmp, &timeout_list, ti_chain) {
463                         if (tmp->ti_timeout < time) {
464                                 list_add(&item->ti_chain, &tmp->ti_chain);
465                                 goto out;
466                         }
467                 }
468                 list_add(&item->ti_chain, &timeout_list);
469         }
470 out:
471         return item;
472 }
473
474 /* Add a client_obd to the timeout event list, when timeout(@time)
475  * happens, the callback(@cb) will be called.
476  */
477 int ptlrpc_add_timeout_client(time64_t time, enum timeout_event event,
478                               timeout_cb_t cb, void *data,
479                               struct list_head *obd_list)
480 {
481         struct timeout_item *ti;
482
483         mutex_lock(&pinger_mutex);
484         ti = ptlrpc_pinger_register_timeout(time, event, cb, data);
485         if (!ti) {
486                 mutex_unlock(&pinger_mutex);
487                 return (-EINVAL);
488         }
489         list_add(obd_list, &ti->ti_obd_list);
490         mutex_unlock(&pinger_mutex);
491         return 0;
492 }
493 EXPORT_SYMBOL(ptlrpc_add_timeout_client);
494
495 int ptlrpc_del_timeout_client(struct list_head *obd_list,
496                               enum timeout_event event)
497 {
498         struct timeout_item *ti = NULL, *item;
499
500         if (list_empty(obd_list))
501                 return 0;
502         mutex_lock(&pinger_mutex);
503         list_del_init(obd_list);
504         /**
505          * If there are no obd attached to the timeout event
506          * list, remove this timeout event from the pinger
507          */
508         list_for_each_entry(item, &timeout_list, ti_chain) {
509                 if (item->ti_event == event) {
510                         ti = item;
511                         break;
512                 }
513         }
514         LASSERTF(ti != NULL, "ti is NULL !\n");
515         if (list_empty(&ti->ti_obd_list)) {
516                 list_del(&ti->ti_chain);
517                 OBD_FREE_PTR(ti);
518         }
519         mutex_unlock(&pinger_mutex);
520         return 0;
521 }
522 EXPORT_SYMBOL(ptlrpc_del_timeout_client);
523
524 int ptlrpc_pinger_remove_timeouts(void)
525 {
526         struct timeout_item *item, *tmp;
527
528         mutex_lock(&pinger_mutex);
529         list_for_each_entry_safe(item, tmp, &timeout_list, ti_chain) {
530                 LASSERT(list_empty(&item->ti_obd_list));
531                 list_del(&item->ti_chain);
532                 OBD_FREE_PTR(item);
533         }
534         mutex_unlock(&pinger_mutex);
535         return 0;
536 }
537
538 void ptlrpc_pinger_wake_up()
539 {
540 #ifdef ENABLE_PINGER
541         mod_delayed_work(pinger_wq, &ping_work, 0);
542 #endif
543 }
544
545 /* Ping evictor thread */
546 #define PET_READY     1
547 #define PET_TERMINATE 2
548
549 static int               pet_refcount = 0;
550 static int               pet_state;
551 static wait_queue_head_t pet_waitq;
552 static struct list_head  pet_list;
553 static DEFINE_SPINLOCK(pet_lock);
554
555 int ping_evictor_wake(struct obd_export *exp)
556 {
557         struct obd_device *obd;
558
559         spin_lock(&pet_lock);
560         if (pet_state != PET_READY) {
561                 /* eventually the new obd will call here again. */
562                 spin_unlock(&pet_lock);
563                 return 1;
564         }
565
566         obd = class_exp2obd(exp);
567         if (list_empty(&obd->obd_evict_list)) {
568                 class_incref(obd, "evictor", obd);
569                 list_add(&obd->obd_evict_list, &pet_list);
570         }
571         spin_unlock(&pet_lock);
572
573         wake_up(&pet_waitq);
574         return 0;
575 }
576
577 static int ping_evictor_main(void *arg)
578 {
579         struct obd_device *obd;
580         struct obd_export *exp;
581         struct l_wait_info lwi = { 0 };
582         time64_t expire_time;
583
584         ENTRY;
585         unshare_fs_struct();
586
587         CDEBUG(D_HA, "Starting Ping Evictor\n");
588         pet_state = PET_READY;
589         while (1) {
590                 l_wait_event(pet_waitq, (!list_empty(&pet_list)) ||
591                             (pet_state == PET_TERMINATE), &lwi);
592
593                 /* loop until all obd's will be removed */
594                 if ((pet_state == PET_TERMINATE) && list_empty(&pet_list))
595                         break;
596
597                 /* we only get here if pet_exp != NULL, and the end of this
598                  * loop is the only place which sets it NULL again, so lock
599                  * is not strictly necessary. */
600                 spin_lock(&pet_lock);
601                 obd = list_entry(pet_list.next, struct obd_device,
602                                  obd_evict_list);
603                 spin_unlock(&pet_lock);
604
605                 expire_time = ktime_get_real_seconds() - PING_EVICT_TIMEOUT;
606
607                 CDEBUG(D_HA, "evicting all exports of obd %s older than %lld\n",
608                        obd->obd_name, expire_time);
609
610                 /* Exports can't be deleted out of the list while we hold
611                  * the obd lock (class_unlink_export), which means we can't
612                  * lose the last ref on the export.  If they've already been
613                  * removed from the list, we won't find them here. */
614                 spin_lock(&obd->obd_dev_lock);
615                 while (!list_empty(&obd->obd_exports_timed)) {
616                         exp = list_entry(obd->obd_exports_timed.next,
617                                          struct obd_export,
618                                          exp_obd_chain_timed);
619                         if (expire_time > exp->exp_last_request_time) {
620                                 class_export_get(exp);
621                                 spin_unlock(&obd->obd_dev_lock);
622                                 LCONSOLE_WARN("%s: haven't heard from client %s"
623                                               " (at %s) in %lld seconds. I think"
624                                               " it's dead, and I am evicting"
625                                               " it. exp %p, cur %lld expire %lld"
626                                               " last %lld\n",
627                                               obd->obd_name,
628                                               obd_uuid2str(&exp->exp_client_uuid),
629                                               obd_export_nid2str(exp),
630                                               ktime_get_real_seconds() -
631                                               exp->exp_last_request_time,
632                                               exp, ktime_get_real_seconds(),
633                                               expire_time,
634                                               exp->exp_last_request_time);
635                                 CDEBUG(D_HA, "Last request was at %lld\n",
636                                        exp->exp_last_request_time);
637                                 class_fail_export(exp);
638                                 class_export_put(exp);
639                                 spin_lock(&obd->obd_dev_lock);
640                         } else {
641                                 /* List is sorted, so everyone below is ok */
642                                 break;
643                         }
644                 }
645                 spin_unlock(&obd->obd_dev_lock);
646
647                 spin_lock(&pet_lock);
648                 list_del_init(&obd->obd_evict_list);
649                 spin_unlock(&pet_lock);
650
651                 class_decref(obd, "evictor", obd);
652         }
653         CDEBUG(D_HA, "Exiting Ping Evictor\n");
654
655         RETURN(0);
656 }
657
658 void ping_evictor_start(void)
659 {
660         struct task_struct *task;
661
662         if (++pet_refcount > 1)
663                 return;
664
665         INIT_LIST_HEAD(&pet_list);
666         init_waitqueue_head(&pet_waitq);
667
668         task = kthread_run(ping_evictor_main, NULL, "ll_evictor");
669         if (IS_ERR(task)) {
670                 pet_refcount--;
671                 CERROR("Cannot start ping evictor thread: %ld\n",
672                         PTR_ERR(task));
673         }
674 }
675 EXPORT_SYMBOL(ping_evictor_start);
676
677 void ping_evictor_stop(void)
678 {
679         if (--pet_refcount > 0)
680                 return;
681
682         pet_state = PET_TERMINATE;
683         wake_up(&pet_waitq);
684 }
685 EXPORT_SYMBOL(ping_evictor_stop);