diff --git a/ChangeLog b/ChangeLog
index d7ee676..fdfc00a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2018-11-08  Ma Ling  <ling.ml@antfin.com>
+
+	* sysdeps/x86_64/nptl/Makefile: Add the ali_workqueue compile command.
+	* nptl/Versions: Export 2 routines of ali_workqueue.
+	* nptl/ali_workqueue.c: New file, the implementation of ali_workqueue by using
+	adaptive lock integration machnism.
+	* include/ali_workqueue.h: New file, the user API definition.
+
 2018-11-05  Arjun Shankar  <arjun@redhat.com>
 
 	* iconv/gconv_conf.c (__gconv_read_conf): Remove NULL check for
diff --git a/include/ali_workqueue.h b/include/ali_workqueue.h
new file mode 100644
index 0000000..62f3429
--- /dev/null
+++ b/include/ali_workqueue.h
@@ -0,0 +1,26 @@
+#ifndef _ALI_WORKQUEUE_H_
+#define _ALI_WORKQUEUE_H_
+
+#define __aligned(x)	__attribute__((aligned(x)))
+struct socket {
+	void *core __aligned(64);
+	char pad __aligned(64);
+};
+
+struct ali_workqueue {
+	struct socket  owner;
+	struct socket  cpu[0];
+} ali_workqueue_t;
+
+
+struct ali_workqueue_info {
+	struct ali_workqueue_info *next  __aligned(64);
+	int pending;
+	void (*fn)(void *);
+	void *para;
+	int socket;
+};
+
+void ali_workqueue_init(struct ali_workqueue *ali_wq, int size);
+void ali_workqueue(struct ali_workqueue *ali_wq, struct ali_workqueue_info *ali);
+#endif
diff --git a/nptl/Versions b/nptl/Versions
index e7f691d..f4afa6d 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -267,6 +267,8 @@ libpthread {
   }
 
   GLIBC_2.22 {
+   ali_workqueue_init;
+   ali_workqueue;
   }
 
   # C11 thread symbols.
diff --git a/nptl/ali_workqueue.c b/nptl/ali_workqueue.c
new file mode 100644
index 0000000..fe34ca0
--- /dev/null
+++ b/nptl/ali_workqueue.c
@@ -0,0 +1,102 @@
+/* Copyright (C) 2018 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <stdio.h>
+#include <string.h>
+#include <stdint.h>
+#include <atomic.h>
+#include "ali_workqueue.h"
+
+static inline void run_workqueue(struct ali_workqueue_info *old, void **cpu)
+{
+
+	struct ali_workqueue_info *next, *ali;
+
+	old->fn(old->para);
+retry:
+	ali = __sync_val_compare_and_swap(cpu, old, NULL);
+
+	if(ali == old)
+		goto end;
+
+	ali =  atomic_exchange_acquire(cpu, old);
+
+repeat:    
+	if(old == ali)
+		goto retry;
+
+	while (!(next = atomic_load_relaxed(&ali->next)))
+   		atomic_spin_nop ();
+
+	ali->fn(ali->para);
+	ali->pending = 0;    
+	ali = next;    
+	goto repeat;
+
+end:
+	atomic_store_release(&ali->pending, 0);
+	return;
+}
+
+void ali_workqueue(struct ali_workqueue *ali_wq, struct ali_workqueue_info *ali)
+{
+
+	struct ali_workqueue_info *old;
+	void **core;
+	ali->next = NULL;
+	ali->pending = 1;
+	core = &ali_wq->cpu[ali->socket].core;
+	old =  atomic_exchange_acquire(core , ali);
+	if(old)	{
+		atomic_store_release(&ali->next, old);
+		while(atomic_load_relaxed(&ali->pending))
+   			atomic_spin_nop ();
+		return;
+	}
+
+	old =  atomic_exchange_acquire(&ali_wq->owner.core, ali);
+	if(old) {
+		atomic_store_release(&old->next, ali);
+		while((atomic_load_relaxed(&ali->pending)))
+   			atomic_spin_nop ();
+	}
+
+	run_workqueue(ali, core);
+	old = ali;
+
+	ali = __sync_val_compare_and_swap(&ali_wq->owner.core, old, NULL);
+	if(ali == old)
+		goto end;
+
+	while (!(ali = atomic_load_relaxed(&old->next)))
+		atomic_spin_nop ();
+
+
+	atomic_store_release(&ali->pending, 0);
+
+end:
+	return;
+
+}
+
+/* Init ali work queue */
+void ali_workqueue_init(struct ali_workqueue *ali_wq, int size)
+{
+	memset(ali_wq, 0, size);
+}
+
diff --git a/sysdeps/x86_64/nptl/Makefile b/sysdeps/x86_64/nptl/Makefile
index 7302403..a5d91e2 100644
--- a/sysdeps/x86_64/nptl/Makefile
+++ b/sysdeps/x86_64/nptl/Makefile
@@ -18,3 +18,4 @@
 ifeq ($(subdir),csu)
 gen-as-const-headers += tcb-offsets.sym
 endif
+libpthread-routines += ali_workqueue
