aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
tle='author Alexey Dobriyan <adobriyan@gmail.com> 2008-10-15 15:50:22 -0400 committer Alexey Dobriyan <adobriyan@gmail.com> 2008-10-23 05:52:40 -0400 proc: switch /proc/meminfo to seq_file' href='/cgit/cgit.cgi/litmus-rt-ext-res.git/commit/mm/hugetlb.c?id=e1759c215bee5abbcb6cb066590ab20905154ed5'>e1759c215bee
1da177e4c3f4

cddb8a5c14aa
1da177e4c3f4
63551ae0feaa
5da7ca860789
3b32123d734c
aea47ff363c1
3935baa9bcda
aa888a74977a
a3437870160c
5a0e3ad6af86
174cd4b1e5fb
0fe6e20b9c4c
fd6a03edd271

c8721bbbdd36
8382d914ebf7
d6606683a5e3
63551ae0feaa

24669e58477e
63551ae0feaa
24669e58477e
63551ae0feaa
9dd540e23111
9a30523066cd
1a1aad8a9b7b
7835e98b2e3c
1da177e4c3f4
753162cd849c
a5516438959d
c3f38a38715e
e5ff215941d5

641844f5616d




e5ff215941d5
53ba51d21d6e

e5ff215941d5


e11bfbfcb08e
9fee021d15dd
e5ff215941d5
3935baa9bcda
31caf665e666

3935baa9bcda
c3f38a38715e
0bd0f9fb190a
8382d914ebf7




c672c7f29f2f
8382d914ebf7
7ca02d0ae586


90481622d757






7ca02d0ae586





90481622d757
7ca02d0ae586
90481622d757

7ca02d0ae586

90481622d757


c6a918200c4f
90481622d757




7ca02d0ae586








90481622d757











1c5ecae3a93f








90481622d757

1c5ecae3a93f
90481622d757

1c5ecae3a93f
90481622d757

1c5ecae3a93f







90481622d757
90481622d757
09a95e29cb30

1c5ecae3a93f














90481622d757


1c5ecae3a93f






90481622d757

1c5ecae3a93f

90481622d757
1c5ecae3a93f
90481622d757

1c5ecae3a93f



09a95e29cb30

1c5ecae3a93f













90481622d757
1c5ecae3a93f

90481622d757








496ad9aa8ef4
90481622d757

e7c4b0bfd025
968229048437

84afd99b8398
1dd308a7b49d













968229048437






1dd308a7b49d

5e9113731a3c







cf3ad20bfead


1dd308a7b49d
1406ec9ba6c6
968229048437
1406ec9ba6c6
968229048437
cf3ad20bfead
968229048437
7b24d8616be3
968229048437




5e9113731a3c





















968229048437

















cf3ad20bfead




968229048437



cf3ad20bfead

968229048437
cf3ad20bfead
968229048437
cf3ad20bfead
5e9113731a3c

7b24d8616be3
cf3ad20bfead

968229048437

1dd308a7b49d












5e9113731a3c







1dd308a7b49d
1406ec9ba6c6
968229048437
1406ec9ba6c6
7b24d8616be3
968229048437

7b24d8616be3

5e9113731a3c















dbe409e4f5e5

5e9113731a3c
dbe409e4f5e5
5e9113731a3c






968229048437








7b24d8616be3
5e9113731a3c
7b24d8616be3









968229048437
7b24d8616be3


968229048437











7b24d8616be3
968229048437
25985edcedea
968229048437







7b24d8616be3







968229048437


1dd308a7b49d
5e9113731a3c


















feba16e25a57











1dd308a7b49d
feba16e25a57
968229048437
1406ec9ba6c6
968229048437
feba16e25a57

968229048437
feba16e25a57
7b24d8616be3
feba16e25a57
dbe409e4f5e5







feba16e25a57
dbe409e4f5e5
feba16e25a57
968229048437
968229048437
feba16e25a57












968229048437
feba16e25a57



















968229048437
feba16e25a57















968229048437
7b24d8616be3
7b24d8616be3
feba16e25a57

968229048437

1dd308a7b49d
b5cec28d36f5







72e2936c04f7
b5cec28d36f5




72e2936c04f7
b5cec28d36f5






1dd308a7b49d


1406ec9ba6c6
84afd99b8398
1406ec9ba6c6
84afd99b8398


7b24d8616be3
84afd99b8398

f2135a4a57a7

84afd99b8398










7b24d8616be3
84afd99b8398



968229048437
e7c4b0bfd025
e7c4b0bfd025

a5516438959d

e7c4b0bfd025
a5516438959d

e7c4b0bfd025

0fe6e20b9c4c




dee410792419
0fe6e20b9c4c
84afd99b8398
08fba69986e2











2415cf12e04d
08fba69986e2
f340ca0f065e
08fba69986e2

3340289ddf29












84afd99b8398





04f2cbe35699
84afd99b8398
a1e78772d72b








84afd99b8398








a1e78772d72b
e7c4b0bfd025










9119a41e9091
84afd99b8398

5e9113731a3c




84afd99b8398
5e9113731a3c
84afd99b8398

7b24d8616be3
84afd99b8398

5e9113731a3c





84afd99b8398


9119a41e9091
84afd99b8398

5e9113731a3c

84afd99b8398

feba16e25a57
5e9113731a3c








84afd99b8398


4e35f483850b




84afd99b8398
a1e78772d72b
81d1b09c6be6
4e35f483850b






84afd99b8398

4e35f483850b
a1e78772d72b

84afd99b8398
a1e78772d72b
81d1b09c6be6

a1e78772d72b
84afd99b8398

04f2cbe35699



81d1b09c6be6

e7c4b0bfd025

04f2cbe35699



81d1b09c6be6
e7c4b0bfd025

a1e78772d72b

04f2cbe35699
a1e78772d72b

81d1b09c6be6
f83a275dbc5c
a1e78772d72b



559ec2f8fd50
a1e78772d72b
af0ed73e699b










559ec2f8fd50
af0ed73e699b
559ec2f8fd50
af0ed73e699b
a63884e921cb

1fb1b0e9ef2d












a63884e921cb




67961f9db8c4




















a63884e921cb
559ec2f8fd50
a1e78772d72b

a5516438959d
1da177e4c3f4

0edaecfab218
a5516438959d

1da177e4c3f4

bf50bab2b344



c8721bbbdd36







bf50bab2b344
0edaecfab218
a9869b837c09
bf50bab2b344




86cdb465cf3a


100873d7a777
86cdb465cf3a




a5516438959d

af0ed73e699b

1da177e4c3f4
b1c12cbcd0a0
480eccf9ae10
19770b32609b
c0ff7453bb5c
dd1a239f6f2d

cc9a6c877661
1da177e4c3f4
a1e78772d72b




af0ed73e699b
a5516438959d
c0ff7453bb5c
a1e78772d72b
04f2cbe35699
a5516438959d
6eab04a87677
04f2cbe35699
9966c4bbb110
d26914d11751
9966c4bbb110
86cdb465cf3a
9966c4bbb110
19770b32609b

344736f29b35
bf50bab2b344

af0ed73e699b




07443a85ad90
af0ed73e699b
bf50bab2b344

3abf7afd4068
1da177e4c3f4
cc9a6c877661
52cd3b074050
d26914d11751
cc9a6c877661
1da177e4c3f4
cc9a6c877661

cc9a6c877661
1da177e4c3f4

1cac6f2c072a








0edaf86cf1a6
1cac6f2c072a




























































461a7184320a
d08de8e2d867

944d9fec8d7a
d00181b96eb8
944d9fec8d7a




c8cc708a340c
944d9fec8d7a
1d798ca3f164
944d9fec8d7a
944d9fec8d7a





d00181b96eb8
944d9fec8d7a







ca96b6253410

944d9fec8d7a

f44b2dda8bc2

944d9fec8d7a









f44b2dda8bc2


944d9fec8d7a



















d00181b96eb8
944d9fec8d7a










f44b2dda8bc2
944d9fec8d7a






















d00181b96eb8
944d9fec8d7a































d00181b96eb8
944d9fec8d7a
d00181b96eb8
944d9fec8d7a



a5516438959d
6af2acb66196

a5516438959d
944d9fec8d7a

18229df5b613
a5516438959d


32f84528fbb5

a7407a27c2bb

6af2acb66196
309381feaee5
f1e61557f023
6af2acb66196
944d9fec8d7a



944d9fec8d7a

6af2acb66196

e5ff215941d5










bcc54222309c
























8f1d26d0e59b
27a85ef1b813
a5516438959d



e5ff215941d5
7893d1d505d5
90481622d757

07443a85ad90
27a85ef1b813
e5df70ab1945
23be7468e880
b4330afbed0c

07443a85ad90
16c794b4f3ff
27a85ef1b813
1c5ecae3a93f







27a85ef1b813
bcc54222309c
6d76dcf40405

07443a85ad90


944d9fec8d7a
0edaecfab218

a5516438959d


7893d1d505d5
5d3a551c28c6
a5516438959d
7893d1d505d5
27a85ef1b813


a5516438959d
b7ba30c679ed
0edaecfab218
f1e61557f023
b7ba30c679ed
9dd540e23111
a5516438959d

b7ba30c679ed



d00181b96eb8
20a0307c0396






ef5a22be2c52
de09d31dd38a
20a0307c0396
ef5a22be2c52












58a84aa92723
1d798ca3f164
20a0307c0396
b4330afbed0c
20a0307c0396

7795912c257b




20a0307c0396

20a0307c0396



f1e61557f023
20a0307c0396
43131e141abd

27c73ae75977





27c73ae75977


758f66a29ccc
27c73ae75977
27c73ae75977
13d60f4b6ab5
















a5516438959d
1da177e4c3f4
1da177e4c3f4
f96efd585b8d
96db800f5d73
86cdb465cf3a
551883ae8c9c
a5516438959d
1da177e4c3f4
a5516438959d
1da177e4c3f4
63b4613c3f0d



b2261026825e





















e8c5c8249878





6ae11b278bca

e8c5c8249878
b2261026825e
e8c5c8249878

b2261026825e
685f34570809



b2261026825e

e8c5c8249878
b2261026825e
e8c5c8249878


b2261026825e
685f34570809

b2261026825e
685f34570809
e8c5c8249878

9a76db099709
e8c5c8249878
b2261026825e
e8c5c8249878



c8721bbbdd36

082d5b6b60e9


c8721bbbdd36
082d5b6b60e9
c8721bbbdd36
082d5b6b60e9

c8721bbbdd36

2247bb335ab9


082d5b6b60e9



2247bb335ab9
c8721bbbdd36

c1470b33bb6e
2247bb335ab9
c8721bbbdd36
082d5b6b60e9
c8721bbbdd36
082d5b6b60e9
c8721bbbdd36




2247bb335ab9

082d5b6b60e9

c8721bbbdd36
082d5b6b60e9
c8721bbbdd36
c8721bbbdd36
eb03aa008561
082d5b6b60e9
c8721bbbdd36
d0177639310d
082d5b6b60e9
d0177639310d
eb03aa008561







082d5b6b60e9

c8721bbbdd36

099730d67417

















e0ec90ee7e6f





099730d67417
e0ec90ee7e6f
099730d67417















e0ec90ee7e6f

099730d67417































7893d1d505d5

bf50bab2b344
7893d1d505d5
bae7f4ae14d4
aa888a74977a

d1c3fb1f8f29
099730d67417




e0ec90ee7e6f

099730d67417

d1c3fb1f8f29






















a5516438959d
d1c3fb1f8f29


a5516438959d

d1c3fb1f8f29


099730d67417
d1c3fb1f8f29

7893d1d505d5
0edaecfab218
bf50bab2b344
f1e61557f023
9dd540e23111
d1c3fb1f8f29


bf50bab2b344

3b1163006332
d1c3fb1f8f29
a5516438959d

3b1163006332
7893d1d505d5
d1c3fb1f8f29
7893d1d505d5



e4e574b767ba
099730d67417



e0ec90ee7e6f
099730d67417









e0ec90ee7e6f
099730d67417






bf50bab2b344





4ef918480436
bf50bab2b344

4ef918480436

bf50bab2b344

94ae8ba71766
099730d67417
bf50bab2b344




25985edcedea
e4e574b767ba

a5516438959d
e4e574b767ba




28073b02bfaa
e4e574b767ba
a5516438959d
ac09b3a15154
a5516438959d
e4e574b767ba
ac09b3a15154
e4e574b767ba







099730d67417
28073b02bfaa



e4e574b767ba

28073b02bfaa
e4e574b767ba





a5516438959d

28073b02bfaa









e4e574b767ba

25985edcedea
e4e574b767ba
ac09b3a15154


e4e574b767ba

a5516438959d
e4e574b767ba
a9869b837c09
19fc3f0acde3
e4e574b767ba
19fc3f0acde3

a9869b837c09




309381feaee5
a5516438959d
19fc3f0acde3
28073b02bfaa
b0365c8d0cb6
19fc3f0acde3

c0d934ba2789

a9869b837c09
e4e574b767ba




e5bbc8a6c992











e4e574b767ba
a5516438959d

e4e574b767ba
e4e574b767ba

aa888a74977a
bae7f4ae14d4
e5bbc8a6c992
aa888a74977a
e5bbc8a6c992



a5516438959d
e4e574b767ba
685f34570809

9b5e5d0fdc91




e5bbc8a6c992



685f34570809

e5bbc8a6c992

8cebfcd074a3
e5bbc8a6c992
7848a4bf51b3
e4e574b767ba
e5bbc8a6c992



e4e574b767ba

5e9113731a3c
c37f9fb11c97
feba16e25a57
5e9113731a3c
cf3ad20bfead





feba16e25a57


cf3ad20bfead





96b96a96ddee




c37f9fb11c97
5e9113731a3c


feba16e25a57
96b96a96ddee
5e9113731a3c
cf3ad20bfead

5e9113731a3c
c37f9fb11c97
4e35f483850b

cf3ad20bfead
c37f9fb11c97
4e35f483850b

84afd99b8398
c37f9fb11c97
4e35f483850b
5e9113731a3c

cf3ad20bfead
5e9113731a3c



feba16e25a57
5e9113731a3c


96b96a96ddee







5e9113731a3c


84afd99b8398
4e35f483850b
cf3ad20bfead
67961f9db8c4


















4e35f483850b
cf3ad20bfead
c37f9fb11c97
cf3ad20bfead

a5516438959d
c37f9fb11c97
5e9113731a3c
cf3ad20bfead
84afd99b8398
cf3ad20bfead


5e9113731a3c


feba16e25a57
5e9113731a3c

feba16e25a57
c37f9fb11c97

96b96a96ddee

















































70c3547e36f5
04f2cbe35699
1da177e4c3f4
90481622d757
a5516438959d
348ea204cc23
d85f69b0b533

6d76dcf40405

a1e78772d72b
6d76dcf40405
a1e78772d72b
d85f69b0b533


a1e78772d72b
d85f69b0b533

76dcee75c1af
d85f69b0b533










feba16e25a57
76dcee75c1af
5e9113731a3c
1da177e4c3f4
d85f69b0b533











6d76dcf40405
8f34af6f93ae


1da177e4c3f4
d85f69b0b533





81a6fcae3ff3
94ae8ba71766
099730d67417
8f34af6f93ae

a88c76954804



79dbb2368ae3

81a6fcae3ff3
68842c9b9456
81a6fcae3ff3

348ea204cc23
90481622d757
90d8b7e6129e
d85f69b0b533

33039678c8da













90d8b7e6129e
8f34af6f93ae



d85f69b0b533
8f34af6f93ae
feba16e25a57
8f34af6f93ae
b45b5bd65f66

74060e4d7879













91f47662dfaa
aa888a74977a

b2261026825e
aa888a74977a
b2261026825e
aa888a74977a

8b89a1169437


aa888a74977a






91f47662dfaa
aa888a74977a
aa888a74977a



df994ead5457
aa888a74977a





d00181b96eb8

18229df5b613






aa888a74977a





aa888a74977a
ee8f248d266e



8b89a1169437

ee8f248d266e


aa888a74977a
18229df5b613
ef5a22be2c52
aa888a74977a
b0320c7b7d1a





bae7f4ae14d4
3dcc0571cd64
aa888a74977a


8faa8b077b2c
1da177e4c3f4

a5516438959d
e5ff215941d5
bae7f4ae14d4
aa888a74977a

9b5e5d0fdc91
8cebfcd074a3
1da177e4c3f4
1da177e4c3f4
8faa8b077b2c
e5ff215941d5






641844f5616d


8faa8b077b2c
bae7f4ae14d4
8faa8b077b2c
e5ff215941d5
641844f5616d
e5ff215941d5

4abd32dbab20










e5ff215941d5




4abd32dbab20
ffb22af5b7a5
4abd32dbab20

e5ff215941d5


1da177e4c3f4
6ae11b278bca

1da177e4c3f4
4415cc8df630

bae7f4ae14d4
aa888a74977a

6ae11b278bca
1da177e4c3f4
a5516438959d


6b0c880dfefe
1da177e4c3f4


e5ff215941d5
a5516438959d

1da177e4c3f4



6ae11b278bca

1da177e4c3f4



20a0307c0396




6ae11b278bca

20a0307c0396
b2261026825e
20a0307c0396

20a0307c0396
b2261026825e



e8c5c8249878
b2261026825e




e8c5c8249878
b2261026825e

20a0307c0396
b2261026825e



20a0307c0396

a5516438959d
6ae11b278bca

1da177e4c3f4
7893d1d505d5
1da177e4c3f4
944d9fec8d7a
aa888a74977a

7893d1d505d5



d1c3fb1f8f29
d15c7c09325b
d1c3fb1f8f29



7893d1d505d5
1da177e4c3f4
a5516438959d
6ae11b278bca
7893d1d505d5


a5516438959d
7893d1d505d5





649920c6ab93



944d9fec8d7a



7893d1d505d5



536240f2bde9


7893d1d505d5
7893d1d505d5






d1c3fb1f8f29



d15c7c09325b
d1c3fb1f8f29


7893d1d505d5
a5516438959d
6b0c880dfefe
6ae11b278bca
a5516438959d
6ae11b278bca
1da177e4c3f4
55f67141a892
1da177e4c3f4
a5516438959d
6ae11b278bca
7893d1d505d5


a5516438959d
1da177e4c3f4
7893d1d505d5
1da177e4c3f4

a3437870160c









9a30523066cd


a3437870160c

9a30523066cd
a3437870160c
9a30523066cd


a3437870160c
9a30523066cd


a3437870160c

06808b0827e1
a3437870160c

9a30523066cd










a3437870160c
adbe8726dc2a
238d3c13f0cc


a3437870160c

bad44b5be84c
a3437870160c
944d9fec8d7a
adbe8726dc2a



9a30523066cd






8cebfcd074a3
9a30523066cd








8cebfcd074a3
9a30523066cd
06808b0827e1
a3437870160c
8cebfcd074a3
06808b0827e1


adbe8726dc2a


06808b0827e1

238d3c13f0cc
















06808b0827e1








238d3c13f0cc
a3437870160c


06808b0827e1














238d3c13f0cc
06808b0827e1




a3437870160c


9a30523066cd
a3437870160c

adbe8726dc2a
a3437870160c




9a30523066cd
a3437870160c
bae7f4ae14d4
adbe8726dc2a

3dbb95f7895e
a3437870160c
73ae31e5986a
a3437870160c











9a30523066cd










a3437870160c





9a30523066cd
a3437870160c






9a30523066cd










a3437870160c








06808b0827e1


a3437870160c






094e9539bd24


a3437870160c

972dc4de13f6
a3437870160c
9a30523066cd

a3437870160c

9a30523066cd
a3437870160c
9a30523066cd
a3437870160c













9a30523066cd

a3437870160c
ffb22af5b7a5
a3437870160c


9a30523066cd



10fbcf4c6cb1


9a30523066cd





b4e289a6a659
9a30523066cd

10fbcf4c6cb1
9a30523066cd












10fbcf4c6cb1
9a30523066cd





















10fbcf4c6cb1
9a30523066cd

3cd8b44fa842
9a30523066cd

10fbcf4c6cb1
9a30523066cd

9b5e5d0fdc91
9a30523066cd
972dc4de13f6




9a30523066cd
972dc4de13f6
9a30523066cd




9a30523066cd

10fbcf4c6cb1
9a30523066cd

3cd8b44fa842
9a30523066cd

10fbcf4c6cb1
9a30523066cd





10fbcf4c6cb1
9a30523066cd







ffb22af5b7a5

9a30523066cd






9b5e5d0fdc91
10fbcf4c6cb1

9a30523066cd
7d9ca0004fc3
9a30523066cd


8cebfcd074a3
8732794b1661
10fbcf4c6cb1
9a30523066cd



10fbcf4c6cb1
9a30523066cd














9a30523066cd



a3437870160c

8382d914ebf7

457c1b27ed56
0ef89d25d3e3
a3437870160c
e11bfbfcb08e



a3437870160c
972dc4de13f6
f8b74815a452



a3437870160c

aa888a74977a
a3437870160c


9a30523066cd
7179e7bf4592
9a30523066cd
8382d914ebf7




c672c7f29f2f
8382d914ebf7
c672c7f29f2f
8382d914ebf7

c672c7f29f2f
a3437870160c

3e89e1c5ea84
a3437870160c

9fee021d15dd




d00181b96eb8
a3437870160c

8faa8b077b2c

a3437870160c
598d80914e84
a3437870160c

47d38344abd0
a3437870160c
47d38344abd0
a3437870160c

8faa8b077b2c



0edaecfab218
54f18d352633

a3437870160c

8faa8b077b2c
a3437870160c


e11bfbfcb08e
a3437870160c

8faa8b077b2c
a3437870160c
9fee021d15dd





a3437870160c
47d38344abd0
a3437870160c

9fee021d15dd
a3437870160c



8faa8b077b2c
598d80914e84
8faa8b077b2c


a3437870160c


8faa8b077b2c




47d38344abd0
8faa8b077b2c



a3437870160c

e11bfbfcb08e







a3437870160c
8a21346058ad











06808b0827e1


1da177e4c3f4
e5ff215941d5
238d3c13f0cc
08d4a24659f1
e5ff215941d5
457c1b27ed56
86613628b3d3
457c1b27ed56
e5ff215941d5

08d4a24659f1


e5ff215941d5
238d3c13f0cc


08d4a24659f1

1da177e4c3f4
396faf0303d2
06808b0827e1
















a3d0c6aa1bb3
8d65af789f3e
a3d0c6aa1bb3

a5516438959d
e5ff215941d5
08d4a24659f1
e5ff215941d5
457c1b27ed56
86613628b3d3
457c1b27ed56
c033a93c0d96
e5ff215941d5
bae7f4ae14d4
adbe8726dc2a

e5ff215941d5

08d4a24659f1


e5ff215941d5





08d4a24659f1

a3d0c6aa1bb3

1da177e4c3f4

e1759c215bee
1da177e4c3f4
a5516438959d
457c1b27ed56

e1759c215bee
4f98a2fee8ac




a5516438959d




1da177e4c3f4



a5516438959d
457c1b27ed56

1da177e4c3f4

a1de09195b29

a5516438959d


1da177e4c3f4

949f7ec5760b




457c1b27ed56


949f7ec5760b









5d317b2b6536





1da177e4c3f4


d00285884c08





1da177e4c3f4
1da177e4c3f4
a5516438959d
fc1b8a73dd71





















a5516438959d
fc1b8a73dd71

a5516438959d

fc1b8a73dd71





a5516438959d
fc1b8a73dd71





84afd99b8398

f522c3ac00a4
84afd99b8398




25985edcedea
84afd99b8398


4e35f483850b
f522c3ac00a4
84afd99b8398

a1e78772d72b

a5516438959d
f522c3ac00a4
90481622d757
4e35f483850b
1c5ecae3a93f
84afd99b8398
4e35f483850b

84afd99b8398
4e35f483850b

84afd99b8398
4e35f483850b
84afd99b8398
4e35f483850b


1c5ecae3a93f





84afd99b8398
a1e78772d72b

1da177e4c3f4





11bac8000449
1da177e4c3f4

d0217ac04ca6
1da177e4c3f4

f0f37e2f7773
d0217ac04ca6
84afd99b8398
a1e78772d72b
1da177e4c3f4

1e8f889b10d8

63551ae0feaa


1e8f889b10d8
106c992a5ebe

63551ae0feaa
106c992a5ebe

63551ae0feaa


d9ed9faac283
63551ae0feaa



1e8f889b10d8




106c992a5ebe
32f84528fbb5
4b3073e1c53a
1e8f889b10d8

4a705fef9862
























1e8f889b10d8
63551ae0feaa




1c59827d1da9
1e8f889b10d8
a5516438959d

e8569dd299db


1e8f889b10d8

63551ae0feaa
e8569dd299db




a5516438959d
cb900f412154
c74df32c724a


a5516438959d
e8569dd299db



c5c99429fa57




cb900f412154


4a705fef9862

















34ee645e83b6
7f2e9525ba55
34ee645e83b6


0253d634e080
1c59827d1da9

53f9263baba6
1c59827d1da9
5d317b2b6536
1c59827d1da9
cb900f412154

63551ae0feaa
63551ae0feaa
e8569dd299db



63551ae0feaa

24669e58477e


63551ae0feaa


c7546f8f03f5
63551ae0feaa
cb900f412154
63551ae0feaa
a5516438959d

2ec74c3ef2d8

a5516438959d
63551ae0feaa
a5516438959d

63551ae0feaa
07e326610e56




24669e58477e
2ec74c3ef2d8
569f48b85813
569f48b85813
c7546f8f03f5
4c8872659772
c7546f8f03f5

cb900f412154
31d49da5ad01



39dde65c9940
6629326b89b6
31d49da5ad01



6629326b89b6

9fbc1f635fd0

6629326b89b6
9fbc1f635fd0
106c992a5ebe
31d49da5ad01

8c4894c6bc79
6629326b89b6

04f2cbe35699





31d49da5ad01



04f2cbe35699







c7546f8f03f5
b528e4b6405b
106c992a5ebe
6649a3863232
9e81130b7ce2
5d317b2b6536
d281ee614518
31d49da5ad01
cb900f412154
e77b0852b551
31d49da5ad01




fe1668ae5bf0
2ec74c3ef2d8
24669e58477e
1da177e4c3f4
63551ae0feaa
d833352a4338











c8c06efa8b55
d833352a4338
c8c06efa8b55
d833352a4338



502717f4e112
04f2cbe35699
502717f4e112
24669e58477e




2b047252d087
24669e58477e

502717f4e112

04f2cbe35699





2f4612af43d4

04f2cbe35699
7526674de0c9
04f2cbe35699

04f2cbe35699





7526674de0c9
36e4f20af833

93c76a3d437f
04f2cbe35699
4eb2b1dcd598




83cde9e8ba95
6b2dbba8b6ac
04f2cbe35699




2f84a8990ebb







04f2cbe35699






24669e58477e

04f2cbe35699
83cde9e8ba95
04f2cbe35699

0fe6e20b9c4c

ef009b25f4f8


0fe6e20b9c4c
1e8f889b10d8
3999f52e3198

1e8f889b10d8
3999f52e3198
a5516438959d
1e8f889b10d8
ad4404a226ea
2ec74c3ef2d8

1e8f889b10d8
3999f52e3198
1e8f889b10d8

04f2cbe35699
1e8f889b10d8

37a2140dc214
5a49973d7143
1e8f889b10d8
83c54070ee1a
1e8f889b10d8

04f2cbe35699








5944d0116c77
04f2cbe35699


09cbfeaf1a5a
b76c8cfbff94
ad4404a226ea



cb900f412154
04f2cbe35699
1e8f889b10d8
2fc39cec6a9b
04f2cbe35699







09cbfeaf1a5a
04f2cbe35699
2f4612af43d4











04f2cbe35699

ad4404a226ea


1e8f889b10d8

0fe6e20b9c4c



44e2aa937e69
ad4404a226ea

44e2aa937e69
0fe6e20b9c4c
47ad8475c000

0ed361dec369
bcc54222309c
1e8f889b10d8
2ec74c3ef2d8


ad4404a226ea
b76c8cfbff94
cb900f412154
b76c8cfbff94

cb900f412154
a5516438959d
a9af0c5dfdaf
07443a85ad90

1e8f889b10d8
8fe627ec5b7c
34ee645e83b6
1e8f889b10d8

d281ee614518
cd67f0d2a9a6
1e8f889b10d8


cb900f412154
2ec74c3ef2d8
ad4404a226ea
96b96a96ddee
09cbfeaf1a5a
ad4404a226ea
09cbfeaf1a5a
8312034f3604
ad4404a226ea

1e8f889b10d8

04f2cbe35699
a5516438959d

04f2cbe35699

e7c4b0bfd025
04f2cbe35699

a5516438959d
04f2cbe35699



3ae77f43b111




2a15efc953b2














ab76ad540a50
















a1ed3dda0ad1
8382d914ebf7

ac9b9c667c2e
a5516438959d
ac9b9c667c2e
409eb8c2611b
4c8872659772
4c8872659772
1e8f889b10d8
cb900f412154
4c8872659772
04f2cbe35699


25985edcedea
04f2cbe35699

910154d520c9
ffb22af5b7a5
04f2cbe35699


4c8872659772



6bda666a03f0


a5516438959d
ebed4bfc8da8

1a1aad8a9b7b































04f2cbe35699
2fc39cec6a9b
76dcee75c1af




6bda666a03f0

47ad8475c000
0ed361dec369
bcc54222309c
ac9b9c667c2e
f83a275dbc5c
ab76ad540a50
6bda666a03f0

6bda666a03f0



23be7468e880
6bda666a03f0
0fe6e20b9c4c



409eb8c2611b
23be7468e880
0fe6e20b9c4c
998b4382c1d7





32f84528fbb5
972dc4de13f6
998b4382c1d7

6bda666a03f0
1e8f889b10d8
57303d80175e





5e9113731a3c
2b26736c88db



5e9113731a3c
feba16e25a57
5e9113731a3c
57303d80175e
8bea80520750
a5516438959d
4c8872659772


83c54070ee1a
7f2e9525ba55
4c8872659772

07443a85ad90

409eb8c2611b
ac7149045d9f
53f9263baba6
1e8f889b10d8



5d317b2b6536
788c7df45146
1e8f889b10d8
3999f52e3198
1e8f889b10d8

cb900f412154
4c8872659772

ac9b9c667c2e
4c8872659772

cb900f412154
2b26736c88db
4c8872659772
96b96a96ddee
4c8872659772

ac9b9c667c2e

8382d914ebf7
c672c7f29f2f
8382d914ebf7























c672c7f29f2f
8382d914ebf7







86e5216f8d8a
788c7df45146
86e5216f8d8a
8382d914ebf7
cb900f412154
1e8f889b10d8
8382d914ebf7

0fe6e20b9c4c
57303d80175e
a5516438959d
8382d914ebf7
0f792cf949a0
86e5216f8d8a
1e16a539ac16

fd6a03edd271


290408d4a250
cb900f412154
290408d4a250

32f84528fbb5
972dc4de13f6
0d777df5d895



fd6a03edd271

8382d914ebf7


3935baa9bcda




c672c7f29f2f

8382d914ebf7
7f2e9525ba55

8382d914ebf7
b4d1d99fdd8b
3935baa9bcda
86e5216f8d8a
83c54070ee1a
1e8f889b10d8
57303d80175e
0f792cf949a0









57303d80175e






106c992a5ebe
2b26736c88db

b4d1d99fdd8b
2b26736c88db
5e9113731a3c
feba16e25a57
57303d80175e
f83a275dbc5c
57303d80175e



0f792cf949a0





56c9cfb13c9b



56c9cfb13c9b


0f792cf949a0



b4d1d99fdd8b
0f792cf949a0
b4d1d99fdd8b
788c7df45146
106c992a5ebe
3999f52e3198

0f792cf949a0
b4d1d99fdd8b
106c992a5ebe
b4d1d99fdd8b

788c7df45146

4b3073e1c53a
0f792cf949a0



cb900f412154

57303d80175e




b4d1d99fdd8b
c672c7f29f2f
0f792cf949a0








1e8f889b10d8
86e5216f8d8a

8fb5debc5fcd










1c9e8def43a3
8fb5debc5fcd













810a56b943e2
8fb5debc5fcd




















1c9e8def43a3











8fb5debc5fcd






1c9e8def43a3





8fb5debc5fcd















1c9e8def43a3

8fb5debc5fcd




1c9e8def43a3


8fb5debc5fcd



28a35716d317


87ffc118b54d
63551ae0feaa
d5d4b0aa4e14

28a35716d317
a5516438959d
63551ae0feaa
63551ae0feaa
4c8872659772
cb900f412154
2a15efc953b2
4c8872659772
63551ae0feaa
4c8872659772
02057967b5d3








4c8872659772
2a15efc953b2
4c8872659772
cb900f412154

4c8872659772
a5516438959d
cb900f412154

2a15efc953b2



3ae77f43b111



2a15efc953b2
3ae77f43b111

cb900f412154

2a15efc953b2


63551ae0feaa
9cc3a5bd4006










106c992a5ebe

4c8872659772
87ffc118b54d
63551ae0feaa
cb900f412154

87ffc118b54d
































4c8872659772

a5516438959d
7f2e9525ba55
d5d4b0aa4e14
d6692183ac1d
2a15efc953b2
ddc58f27f9ee
d6692183ac1d
63551ae0feaa




d5d4b0aa4e14
63551ae0feaa

d5d4b0aa4e14
a5516438959d
d5d4b0aa4e14





cb900f412154
63551ae0feaa
28a35716d317
87ffc118b54d




63551ae0feaa

2a15efc953b2
63551ae0feaa
8f860591ffb2
5491ae7b6f48







7da4d641c58d
8f860591ffb2





a5516438959d
7da4d641c58d
8f860591ffb2



a5338093bfb4
83cde9e8ba95
a5516438959d
cb900f412154
8f860591ffb2


cb900f412154
7da4d641c58d

cb900f412154
39dde65c9940
7da4d641c58d
a8bda28d87c3



















8f860591ffb2
106c992a5ebe
be7517d6ab97
8f860591ffb2
7da4d641c58d
8f860591ffb2
cb900f412154
8f860591ffb2
d833352a4338
c8c06efa8b55
d833352a4338
c8c06efa8b55
d833352a4338

5491ae7b6f48
34ee645e83b6
83cde9e8ba95
a5338093bfb4
7da4d641c58d

8f860591ffb2

a1e78772d72b

5a6fe1259506
ca16d140af91
e4e574b767ba
17c9d12e126c
a5516438959d
90481622d757
9119a41e9091
1c5ecae3a93f
e4e574b767ba
a1e78772d72b
17c9d12e126c

90481622d757
17c9d12e126c
ca16d140af91
17c9d12e126c


a1e78772d72b




9119a41e9091
4e35f483850b
9119a41e9091
1406ec9ba6c6
9119a41e9091


17c9d12e126c


a1e78772d72b
84afd99b8398
17c9d12e126c



c50ac050811d



8a63011275e1
1c5ecae3a93f






c50ac050811d


5a6fe1259506

17c9d12e126c
90481622d757
5a6fe1259506
1c5ecae3a93f
68842c9b9456
1c5ecae3a93f

c50ac050811d
68842c9b9456
17c9d12e126c











33039678c8da

















a43a8c39bbb4
c50ac050811d
5e9113731a3c
ff8c0c53c475


f031dd274ccb

c50ac050811d
a43a8c39bbb4

b5cec28d36f5

a43a8c39bbb4
a5516438959d
4e35f483850b
9119a41e9091
90481622d757
1c5ecae3a93f
45c682a68a87
b5cec28d36f5










45c682a68a87
e4c6f8bed01f
45c682a68a87

1c5ecae3a93f





b5cec28d36f5

a43a8c39bbb4
93f70f900da3
3212b535f200










de60f5f10c58

3212b535f200












31aafb45f4e1
3212b535f200








31aafb45f4e1

3212b535f200






c8c06efa8b55
3212b535f200












cb900f412154
3212b535f200



83cde9e8ba95
3212b535f200
















8bea80520750
dc6c9a35b66b
3212b535f200

c17b1f42594e
dc6c9a35b66b
3212b535f200
dc6c9a35b66b
cb900f412154
3212b535f200

83cde9e8ba95
3212b535f200









cb900f412154
3212b535f200






c2febafc6773

3212b535f200






dc6c9a35b66b
3212b535f200


9e5fc74c3025





e81f2d22370f




9e5fc74c3025
3212b535f200

9e5fc74c3025




c2febafc6773
9e5fc74c3025



c2febafc6773

9e5fc74c3025










4e666314d286
9e5fc74c3025






c2febafc6773
9e5fc74c3025
c2febafc6773
9e5fc74c3025

c2febafc6773










9e5fc74c3025


61f77eda9bbf













9e5fc74c3025
e66f17ff7177
9e5fc74c3025
e66f17ff7177

c9d398fa2378
e66f17ff7177








c9d398fa2378

97534127012f
e66f17ff7177


c9d398fa2378
e66f17ff7177










9e5fc74c3025


61f77eda9bbf
9e5fc74c3025
e66f17ff7177
9e5fc74c3025
e66f17ff7177

9e5fc74c3025
e66f17ff7177
9e5fc74c3025

d5bd910696a2

93f70f900da3

93f70f900da3
6de2b1aab943
93f70f900da3


6de2b1aab943
93f70f900da3

7e1f049efb86




56f2fb147659






8c6c2ecb4466
6de2b1aab943



93f70f900da3
6de2b1aab943
93f70f900da3
6de2b1aab943
31caf665e666


bcc54222309c

309381feaee5
31caf665e666
bcc54222309c




31caf665e666
bcc54222309c
31caf665e666
bcc54222309c
31caf665e666



309381feaee5
31caf665e666
bcc54222309c
31caf665e666



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756

                           
                                        
   

                       
                     
                           

                          
                               
                           
                          
                            
                           
                         
                        
                          
                        
                       
                               
                       

                          
                                 
                        
 

                        
                    
 
                     
                          
                                 
                       
                                
                     
 
                               
 
                                     

                                       




                                                                          
 

                                      


                                                              
                                                    
                                                      
 
  

                                                                              
   
                              
 




                                                                  
                                                                     
 


                                                             






                                                                            





                                                                     
                             
         

 

                                                                                


                                       
                                                    




                                     








                                                                     











                                                         








                                                                      

                                                 
                         

                   
                           

                                







                                                                             
         
 

                                                           














                                                                               


                   






                                                                       

                                                  

                         
                   
                             

                                



                                                                             

                                                                                













                                                                            
                                         

                   








                                                                              
                                                       

 
  

                                                                            
  













                                                                             






                              

                                                               







                                                                 


                                                              
   
                                                             
 
                                                
                                           
                     
 
                               




                                                           





















                                                                               

















                                                                           




                                                                       



                                            

                                                                          
                      
                                                                    
                    
 

                                 
                                 

                           

 












                                                             







                                                                            
   
                                                             
 
                                                
                                            

                     

                               















                                                                                 

                                   
                                       
                 






                                                          








                                                                            
                           
                                                 









                                                                
 


                                                    











                                                                           
                                 
 
                                                                        







                                                                     







                                                                         


                   
  


















                                                                     











                                                                    
   
                                                             
 
                                                
                                     

                                       
 
      
                               
                                                       







                                                                               
                                 
 
                                  
                              
 












                                                                                
 



















                                                                        
                              















                                                                              
         
 
                                 

                   

 
  







                                                                         
                                                    




                                                              
                         






                                                       


                                                               
                                                               
 
                                                


                               
                               

                                                                          

                              










                                            
                                 



                   
  
                                                                

                                                         

                                                                          
 

                                                                  

 




                                                                   
                                         
 
  











                                                                             
                                              
 
                                       

  












                                                                            





                                                                      
                                                                
 








                                                                               








                                                                             
   










                                                                            
                                     

                                                                           




                                                                  
                            
         

                                   
                                        

                                           





                                                     


                        
                                       

                                                                             

                                                         

                                                                     
                                          








                                                       


                        




                                                                  
                                                                
 
                                                     






                                                                        

                                                                          
         

 
                                                                              
 

                                                        
 

                                                                       



                                                                               

                                                        

                                                                     



                                                                          
                                                     

                                                       

 
                                                          

                                                          
                                                     
                                           



                                                          
                                                                  
 










                                                                                
                                    
                    
                                     
         

                                                 












                                                                            




                                                               




















                                                                       
 
                     

 
                                                                  

                                    
                                                           

                                       

 



                                                                     







                                                                   
                            
                                                       
                                  




                                       


                                                           
                                                                          




                                            

                                                           

                                                                         
 
                                 
                               
                             
                                  

                          
                                        
 




                                                                            
                                          
                                                                     
                         
 
                                                                             
                                                                          
                         
 
             
                                                       
                                              
                                                                              
 

                                                                             
                                                                    

                                                                            




                                                                
                                                     
                                                     

                                      
                 
         
 
                            
                                                                           
                                  
                    

    
                    

 








                                                                  
                                                




























































                                                                                
                                               

                                                                              
                                                             
                                                           




                                  
                                                   
                                                                      
                                       
                                       





                                    
                                                                     







                                                         

                                                                      

 

                                                                        









                                                        


                                         



















                                                                        
                                                                    










                                                                    
                                                                         






















                                                                               
                                                                               































                                                                             
                                                                                
                                                                    
                                                                       



                                                                                
                                                                     

              
 

                                                                
 


                                                      

                                                                    

                                                                  
         
                                                             
                                                         
                                  



                                                                         

                                                       

 










                                                 
























                                                                               
                                      
 



                                                                  
                                             
                                    

                                                              
                             
 
                                  
                             

                                                  
                                            
                               
 







                                                                              
                                 
                                     

                                                                   


                                     
                                              

                                                      


                                                  
                
                                                
                                           
         


                                   
                                                                            
 
                                   
                                                        
                                 
                                       

                                     



                                                                 
                                                                              






                                                                 
                                  
                            
                                                                      












                                                                               
                                     
                                           
         
                                                    

 




                                                                          

                               



                                   
                                                          
 

                            





                                                                        


                                 
                                                                   
 
 
















                                                                          
                                                                         
 
                          
 
                                      
                                                             
                                                                          
                                    
                   
                                                 
         



                    





















                                                                             





                                                     

                                                                           
 
                           

                    
                                                                      



                                                                        

                                                                          
                                           
                                                                            


                                                            
                                                        

                                                        
                                                                   
                         

                                                      
                              
                 
         



                   

                                                                           


                                                                          
   
                                                     
 

                   

                                                  


                                                        



                                                                   
                                     

                                               
                                    
                                              
         
    
                                   
                  




                                                                          

                                                                           

                                                                         
   
                                                                            
 
                          
                          
                   
 
                                   
                          
 







                                                                         

                  

 

















                                                                            





                                                                 
           
                                               















                                                                

                                                                 































                                                                        

                          
                           
 
                                  

                            
          




                                                                               

                                                     

          






















                                                                        
                                                                   


                                           

                                        


                                   
                                                                  

                                 
                   
                                           
                                          
                                                                
                                               


                                                             

                                                    
                                                     
                

                                        
                                                          
         
                                   



                    
  



                                                       
      









                                                                       
      






                                                                   





                                                                             
                                 

                                 

                                                        

                                   
                  
                                                               




                    
                                                                       

                   
                                                            




                                      
                             
 
                                                                   
                          
                                            
                         
         







                                      
                                                                        



                                         

                                                    
                       





                                                                              

                                                         









                                                                 

                                                                             
                                                                             
                                                                             


                                                                            

                            
                                    
                
 
                                                       
                                                                 

                                   




                                                                            
                                                       
                                           
         
     
                                   

                                                                   

                                                               
                                 




                   











                                                                              
   

                                                                        
 

                               
                                                    
                                  
                         
 



                                                                       
                                                                 
 

                                                                       




                                                                            



                                                                             

                            

                                     
                                                                       
                                 
                                                 
         



                                                

 
 
  
                                                                        
                                                                        





                                                                        


                                                                           





                                                                     




                                                                      
   


                        
                     
                     
  

                                                                               
                                                        
 

                              
                 
 

                                 
                         
 
                                                 

                            
                                                     



                                                     
                          


                                                 







                                                             


                      
 
                                        
                           


















                                                                               
            
                                         
 

                                                   
                                                                       
 
                                                                      
 
 


                                                                       


                                                                       
                                                 

                                                                       
                                                                   

 

















































                                                                           
                                                        
                                                                          
 
                                                          
                                           
                          

                                 

                                    
 
                              
          


                                                                     
           

                                                                
                                        










                                                                 
                                                          
                                                
                 
 











                                                                             
                                                                               


                                     
                                 





                                                                             
                    
                                           
                                                                       

                                                 



                                                                       

                                                               
                                  
         

                                                                              
 
                                                     
 

                                                          













                                                                       
                    



                                                                          
                                     
                                                     
                                          
                                

 













                                                                          
                                                    

                                    
                           
 
                                                                                

                           


                                                                     






                                                                          
                                   
                 



                 
                                                                





                                                                              

                                                             






                                                         





                                                                        
                                             



                                                          

                                                                     


                                       
                                               
                                                        
                                            
                                                               





                                                                               
                                          
                                                                       


         
                                                               

                        
 
                                                 
                                            

                                                        
                                                    
                                                                 
                              
         
                              






                                             


                                                           
                                                                   
                                           
                                                      
         
                                             

 










                                                       




                                         
                             
                                                                                     

                                                       


         
                     

                                                                          
 

              
                                  

                       
                                               
                                         


                                                                    
                                       


                                              
                                                      

                                                                     



                 

                                                                          



      




                                                                          

                                                                           
 
                           

                                             
 



                                                                               
                 




                                                                              
                 

                 
 



                                                  

 
                                                                           

                                                                              
 
                                     
 
                                                                

                                         



                                                                   
          
                                                                          



                                                                        
           
                                 
                                                                           
                                                               


                              
                                                  





                                                                           



                                                    



                                                                          



                                         


                                                                 
         






                                                                        



                                                                     
                                                                    


                                                                      
           
                                                                               
                                          
                                                     
                                                      
                                                              
                              
                                                 
         
                                                  
                                                              


                              
                                       
                                   
                   

 









                                                                    


                                                                           

              
 
                                             


                                                     
                                           


                                               

 
                                                             

                                                                               










                                                           
 
 


                                                                           

                
                                                                              
 
                                                                  



                              






                                                                             
                                                               








                                                                       
                                                       
 
                                                                        
 
                                                    


                                             


                                     

 
















                                                                               








                                                                              
                                                                


                          














                                                                              
                                                               




                                    


                                                                               
                                                      

                                                                  
 




                                                                           
                                                      
 
                                  

                               
                                        
                
                           











                                                                               










                                                               





                                                                               
                                                      






                                                                               










                                                                     








                                           


                                          






                                                   


                                                                              

                   
                                 
 

                                                                   

                               
                                                                         
                   
                                              













                                                                      

                                                                           
                        
                                                                            


         



                                                                            


                                                                            





                                                               
                                                     

  
                                                        












                                                            
                                                                               





















                                                                          
                                                          

                                          
                                                      

                         
                                                              

                                 
                                                          
 




                                                            
                 
         




                                         

  
                                                       

                                          
                                                    

                         
                                                              





                                                                 
                                                                         







                                                                             

                                                                                






                                                      
                                                                         

                                                                    
   
                                                   


                
                                            
                                                      
                                        



                                                    
                                                               














                                                                          



                                                

                                    

              
                                   
                         
 



                                                               
         
                                                                               



                                                                                      

                               
                                  


                             
                                     
                                   
 




                                                                        
                                   
                                                                              
                                           

                                               
                                                          

                 
                              

                                                            




                                        
                                                  

                         

                        
                                                 
                                                                   

                       
                                                      
                           
                                           

                                                        



                                                          
                                                

                                                 

                                                                
 


                          
                                                

                           
                                       
 





                                                                    
          
                                                                                   

                                                                     
                                     



                                                     
                              
                                                                                                   


                         


                                       




                                                                           
                                                                    



                                                          

                 







                                                      
 











                                                             


                                                                           
 
                                           
                                              
                
 
                                   
                                   
 

                                              


                                                                         
 


                                                                              

                   
 
 
















                                                                              
                                                                  
                                            

                                                     
                                           
                          
                
 
                                   
                                   
 
                                          
 
                                           

                               

                                              


                                                                         





                                                  

                   

 

                          
                                               
 
                                           

                                   
                     




                                                    




                                                                       



                                                   
                                           

                                   

                                                

                                                 


                                                      

 




                               


                                   









                                                                                                                        





                                                                              


                                                                               





                                                                            
 
 
                                                            





















                                                                              
                                                       

                                 

                                                                      





                                 
                                                                       





                                   

                                                          
                                                  




                                                                             
                                                                           


                                                                          
                                                           
                                      

 

                                                           
                                           
                                                  
                                                          
                                          
                         
 

                                                             
 

                                                            
 
                                                                 
 


                                                





                                                                             
         

 





                                                                             
                                                    

              
                 

 
                                                    
                                     
                                   
                                     

  

                                                                         


                    
                       

                                                                           
                

                                                               


                                   
                                                               



                     




                                                                      
                                                                        
                                                                     
                                                     

 
























                                                           
 




                                                                         
                           
                

                                             


                                                               

                                                                         
 




                                                                               
                                                                    
                                              


                                                     
                                                        



                                      




                                                                                


                                                                

















                                                                           
                                  
                                                                            


                                                                              
                                                       

                                                  
                                                     
                                                                   
                                                                       
                 

                                     
         
 



                                                                             

 


                                                                               


                                          
                    
                  
                        
                          

                                             

                                                                       
 
                                          

                                           
 




                                                                  
                                
                                                                      
                        
                                              
                                                    
                          

                                 
                                                 



                                                           
 
                                          



                                         

                  

                                                                                
                   
                                                  
                                                          

                                         
                 

                                     





                                                                            



                                                 







                                                                           
                                                                 
                                                                 
                                        
                                             
 
                                                              
                                             
 
                                 
                                                                   




                                                                      
         
                                                                    
                              
 
 











                                                                             
                                                                       
                                                                        
                                                  



                                      
                                                                          
                                                                   
 




                              
                                             

                                                                

 





                                                                             

                                                                               
 
                                           

                                        





                                                                          
                                              

                                                           
                                          
 




                                                                         
                                   
                                                                             




                                                  







                                                                          






                                                                              

                                                                                
         
                                     

 

                                                                               


                                                                            
   
                                                                        

                                                                    
 
                  
                                           
                                         
                                         

                                                               
 
                                  

                                 
                

                                                                     
                                                                 
                                                   
                                                           
                         

         








                                                                            
                                                     


                                                   
                           
 



                                                                         
                         
                                                                  
 
                               







                                                                              
                                           
                                                   











                                                                                

                 


                                                       

         



                                                                     
                                              

                                     
         
 

                                                             
                                    
                                       
 


                                                                      
 
          
                                                                 

                                             
                       
                                                                
                                                                 

                                           
                               
                                                          
                                                                        

                                                                 
                                                 
                                                                   


                                                      
                         
                                                                    
                
                                                            
                           
                
                           
 

                                                            

 
                                                               

                                                                          

                                      
                    

                                          
                                                    



                                            




                                                                             














                                                                          
















                                                                            
                                                                            

                                                                                  
 
                                           
                                  
                          
                           
                          
                      
                        
 


                                                                            
                                                                                

                                                        
                                                                                      
                                         


                           



                                                           


                                            
                                                                        

                                 































                                                                            
                                                        
                                   




                                                      

                                 
                                                                       
                                        
                                           
 
                                                  
                                                                             

                                               



                                                   
                        
                                        



                                                              
                                      
                 
                





                                                                                
                                                 
                                                                     

                                              
         
 





                                                                             
                                                                         



                                                                 
                                                                
                                                     
         
 
                                         
                                                                


                             
                
                                                

                             

                                       
                                                               
              
                                          



                                                                      
                                                      
                                                                         
                                                                     
                                                                     

         
                         

                          
                   

        
                         
                 
                          
                                                        

                       

 
                 
                                                                    























                                                                
                                                                    







                                                               
                                                                   
                                                                  
 
                           
                        
                

                    
                                 
                                           
                                           
                                      
                               
 

                                     


                                            
                                                                  
                                                                 

                                                                        
                                                        
                                                                     



                                                                      

         


                                                    




                                                                            

                                                                           
 

                                    
                                                                                   
                               
         
 
                
 
          









                                                                                






                                                                             
                                                                   

                                                                 
                                       
                 
                                                                
                                                     
 
                                                   



                                                                              





                                                                  



                                                                   


                                   



                                           
 
                       
 
                                       
                                             

                                                                 
                                          
                 
                                                

                                   

                                                                          
                                                     



                                   

                         




                                            
          
                                                       








                                                                                
                   

 










                                                                   
                                                      













                                                                               
                                                                               




















                                                                      











                                                                            






                                                   





                                                                    















                                                                              

                                  




                         


                                  



                       


                                                                           
                                                                      
 

                                        
                                            
                                           
 
                                                  
                           
                                       
                           
                                  
 
                  








                                                                              
                                                                    
                                                                  
                                                              

                                                                          
                   
                                                                     

                                                        



                                                                             



                                                                              
                   

                                                                  

                                                 


                                      
 










                                                                                

                                                             
                                
                                                     
 

                                                 
































                                                                         

                 
                                                                        
                                                    
          
                            
                                                                    
                                           
                 




                                      
                             

                            
                                                       
                                                                      





                                                                             
                                 
         
                              




                                                                     

                          
                               
 
 







                                                                                
                                                                   





                                                                           
                                           
                                



                                             
                                                            
                                                   
                                                             
                                


                                                    
                                                 

                                                           
                                         
                                 
                 



















                                                                           
                                                                         
                                                                        
                                                                    
                                                                
                                
                 
                                 
         
          
                                                                               
                                                                              
                                                                               

                                                              
                                                 
                                                      
                                                     
                                                          

                                 

 

                                                           
                                                                   
                                                            
 
                      
                                               
                                                              
                                  
                         
 
          

                                                                      
                                 
           
                                    


                         




                                                                              
                                                  
                                                 
 
                                                     


                                            


                                       
                                
 



                                                          



                             
 






                                                                        


                              

          
                                                                    
                                                              
           
                                                  
                      

                                                             
                             
         











                                                                            

















                                                                           
                 
        
                                                


                                                                  

                                                            
                   

 

                                                                           
 
                                               
                                                          
                     
                                                              
                         
 










                                                                         
                                  
                                                             

                                    





                                                                       

                 
 
 










                                                                      

                                                                        












                                                                           
                                                                         








                                                            

                            






                                                                               
                                                                           












                                                                               
                        



                                                         
                                   
















                                                                     
                                                       
                             

                                                                            
                                   
                
                                             
         
                         

                                                
                                     









                                                                            
                                    






                                                                            

                                            






                                                    
                           


                                                                     





                                                                           




                                                                            
                                   

                                            




                                                             
                   



                                   

                                       










                                                                        
                                                            






                                                                
                   
                   
                   

                                   










                                    


                             













                                                                      
                                                            
                                      
 

                                 
                  








                                                                      

                                          
                                                                              


                                       
                                                      










                                                                      


                    
                    
                                                            
                                      
 

                             
 
                                                                               

 

                            

                                                    
   
                                                    


                                              
                         

                                 




                                                                               






                                                                              
                                           



                                               
                                   
                   
 
      


                                                                 

                        
                                              
                                 




                                                                     
                                         
       
                                   
                   



                                               
                                              
                                 
                                   



                                                                              
/*
 * Generic hugetlb support.
 * (C) Nadia Yvette Chambers, April 2004
 */
#include <linux/list.h>
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/seq_file.h>
#include <linux/sysctl.h>
#include <linux/highmem.h>
#include <linux/mmu_notifier.h>
#include <linux/nodemask.h>
#include <linux/pagemap.h>
#include <linux/mempolicy.h>
#include <linux/compiler.h>
#include <linux/cpuset.h>
#include <linux/mutex.h>
#include <linux/bootmem.h>
#include <linux/sysfs.h>
#include <linux/slab.h>
#include <linux/sched/signal.h>
#include <linux/rmap.h>
#include <linux/swap.h>
#include <linux/swapops.h>
#include <linux/page-isolation.h>
#include <linux/jhash.h>

#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/tlb.h>

#include <linux/io.h>
#include <linux/hugetlb.h>
#include <linux/hugetlb_cgroup.h>
#include <linux/node.h>
#include <linux/userfaultfd_k.h>
#include "internal.h"

int hugepages_treat_as_movable;

int hugetlb_max_hstate __read_mostly;
unsigned int default_hstate_idx;
struct hstate hstates[HUGE_MAX_HSTATE];
/*
 * Minimum page order among possible hugepage sizes, set to a proper value
 * at boot time.
 */
static unsigned int minimum_order __read_mostly = UINT_MAX;

__initdata LIST_HEAD(huge_boot_pages);

/* for command line parsing */
static struct hstate * __initdata parsed_hstate;
static unsigned long __initdata default_hstate_max_huge_pages;
static unsigned long __initdata default_hstate_size;
static bool __initdata parsed_valid_hugepagesz = true;

/*
 * Protects updates to hugepage_freelists, hugepage_activelist, nr_huge_pages,
 * free_huge_pages, and surplus_huge_pages.
 */
DEFINE_SPINLOCK(hugetlb_lock);

/*
 * Serializes faults on the same logical page.  This is used to
 * prevent spurious OOMs when the hugepage pool is fully utilized.
 */
static int num_fault_mutexes;
struct mutex *hugetlb_fault_mutex_table ____cacheline_aligned_in_smp;

/* Forward declaration */
static int hugetlb_acct_memory(struct hstate *h, long delta);

static inline void unlock_or_release_subpool(struct hugepage_subpool *spool)
{
	bool free = (spool->count == 0) && (spool->used_hpages == 0);

	spin_unlock(&spool->lock);

	/* If no pages are used, and no other handles to the subpool
	 * remain, give up any reservations mased on minimum size and
	 * free the subpool */
	if (free) {
		if (spool->min_hpages != -1)
			hugetlb_acct_memory(spool->hstate,
						-spool->min_hpages);
		kfree(spool);
	}
}

struct hugepage_subpool *hugepage_new_subpool(struct hstate *h, long max_hpages,
						long min_hpages)
{
	struct hugepage_subpool *spool;

	spool = kzalloc(sizeof(*spool), GFP_KERNEL);
	if (!spool)
		return NULL;

	spin_lock_init(&spool->lock);
	spool->count = 1;
	spool->max_hpages = max_hpages;
	spool->hstate = h;
	spool->min_hpages = min_hpages;

	if (min_hpages != -1 && hugetlb_acct_memory(h, min_hpages)) {
		kfree(spool);
		return NULL;
	}
	spool->rsv_hpages = min_hpages;

	return spool;
}

void hugepage_put_subpool(struct hugepage_subpool *spool)
{
	spin_lock(&spool->lock);
	BUG_ON(!spool->count);
	spool->count--;
	unlock_or_release_subpool(spool);
}

/*
 * Subpool accounting for allocating and reserving pages.
 * Return -ENOMEM if there are not enough resources to satisfy the
 * the request.  Otherwise, return the number of pages by which the
 * global pools must be adjusted (upward).  The returned value may
 * only be different than the passed value (delta) in the case where
 * a subpool minimum size must be manitained.
 */
static long hugepage_subpool_get_pages(struct hugepage_subpool *spool,
				      long delta)
{
	long ret = delta;

	if (!spool)
		return ret;

	spin_lock(&spool->lock);

	if (spool->max_hpages != -1) {		/* maximum size accounting */
		if ((spool->used_hpages + delta) <= spool->max_hpages)
			spool->used_hpages += delta;
		else {
			ret = -ENOMEM;
			goto unlock_ret;
		}
	}

	/* minimum size accounting */
	if (spool->min_hpages != -1 && spool->rsv_hpages) {
		if (delta > spool->rsv_hpages) {
			/*
			 * Asking for more reserves than those already taken on
			 * behalf of subpool.  Return difference.
			 */
			ret = delta - spool->rsv_hpages;
			spool->rsv_hpages = 0;
		} else {
			ret = 0;	/* reserves already accounted for */
			spool->rsv_hpages -= delta;
		}
	}

unlock_ret:
	spin_unlock(&spool->lock);
	return ret;
}

/*
 * Subpool accounting for freeing and unreserving pages.
 * Return the number of global page reservations that must be dropped.
 * The return value may only be different than the passed value (delta)
 * in the case where a subpool minimum size must be maintained.
 */
static long hugepage_subpool_put_pages(struct hugepage_subpool *spool,
				       long delta)
{
	long ret = delta;

	if (!spool)
		return delta;

	spin_lock(&spool->lock);

	if (spool->max_hpages != -1)		/* maximum size accounting */
		spool->used_hpages -= delta;

	 /* minimum size accounting */
	if (spool->min_hpages != -1 && spool->used_hpages < spool->min_hpages) {
		if (spool->rsv_hpages + delta <= spool->min_hpages)
			ret = 0;
		else
			ret = spool->rsv_hpages + delta - spool->min_hpages;

		spool->rsv_hpages += delta;
		if (spool->rsv_hpages > spool->min_hpages)
			spool->rsv_hpages = spool->min_hpages;
	}

	/*
	 * If hugetlbfs_put_super couldn't free spool due to an outstanding
	 * quota reference, free it now.
	 */
	unlock_or_release_subpool(spool);

	return ret;
}

static inline struct hugepage_subpool *subpool_inode(struct inode *inode)
{
	return HUGETLBFS_SB(inode->i_sb)->spool;
}

static inline struct hugepage_subpool *subpool_vma(struct vm_area_struct *vma)
{
	return subpool_inode(file_inode(vma->vm_file));
}

/*
 * Region tracking -- allows tracking of reservations and instantiated pages
 *                    across the pages in a mapping.
 *
 * The region data structures are embedded into a resv_map and protected
 * by a resv_map's lock.  The set of regions within the resv_map represent
 * reservations for huge pages, or huge pages that have already been
 * instantiated within the map.  The from and to elements are huge page
 * indicies into the associated mapping.  from indicates the starting index
 * of the region.  to represents the first index past the end of  the region.
 *
 * For example, a file region structure with from == 0 and to == 4 represents
 * four huge pages in a mapping.  It is important to note that the to element
 * represents the first element past the end of the region. This is used in
 * arithmetic as 4(to) - 0(from) = 4 huge pages in the region.
 *
 * Interval notation of the form [from, to) will be used to indicate that
 * the endpoint from is inclusive and to is exclusive.
 */
struct file_region {
	struct list_head link;
	long from;
	long to;
};

/*
 * Add the huge page range represented by [f, t) to the reserve
 * map.  In the normal case, existing regions will be expanded
 * to accommodate the specified range.  Sufficient regions should
 * exist for expansion due to the previous call to region_chg
 * with the same range.  However, it is possible that region_del
 * could have been called after region_chg and modifed the map
 * in such a way that no region exists to be expanded.  In this
 * case, pull a region descriptor from the cache associated with
 * the map and use that for the new range.
 *
 * Return the number of new huge pages added to the map.  This
 * number is greater than or equal to zero.
 */
static long region_add(struct resv_map *resv, long f, long t)
{
	struct list_head *head = &resv->regions;
	struct file_region *rg, *nrg, *trg;
	long add = 0;

	spin_lock(&resv->lock);
	/* Locate the region we are either in or before. */
	list_for_each_entry(rg, head, link)
		if (f <= rg->to)
			break;

	/*
	 * If no region exists which can be expanded to include the
	 * specified range, the list must have been modified by an
	 * interleving call to region_del().  Pull a region descriptor
	 * from the cache and use it for this range.
	 */
	if (&rg->link == head || t < rg->from) {
		VM_BUG_ON(resv->region_cache_count <= 0);

		resv->region_cache_count--;
		nrg = list_first_entry(&resv->region_cache, struct file_region,
					link);
		list_del(&nrg->link);

		nrg->from = f;
		nrg->to = t;
		list_add(&nrg->link, rg->link.prev);

		add += t - f;
		goto out_locked;
	}

	/* Round our left edge to the current segment if it encloses us. */
	if (f > rg->from)
		f = rg->from;

	/* Check for and consume any regions we now overlap with. */
	nrg = rg;
	list_for_each_entry_safe(rg, trg, rg->link.prev, link) {
		if (&rg->link == head)
			break;
		if (rg->from > t)
			break;

		/* If this area reaches higher then extend our area to
		 * include it completely.  If this is not the first area
		 * which we intend to reuse, free it. */
		if (rg->to > t)
			t = rg->to;
		if (rg != nrg) {
			/* Decrement return value by the deleted range.
			 * Another range will span this area so that by
			 * end of routine add will be >= zero
			 */
			add -= (rg->to - rg->from);
			list_del(&rg->link);
			kfree(rg);
		}
	}

	add += (nrg->from - f);		/* Added to beginning of region */
	nrg->from = f;
	add += t - nrg->to;		/* Added to end of region */
	nrg->to = t;

out_locked:
	resv->adds_in_progress--;
	spin_unlock(&resv->lock);
	VM_BUG_ON(add < 0);
	return add;
}

/*
 * Examine the existing reserve map and determine how many
 * huge pages in the specified range [f, t) are NOT currently
 * represented.  This routine is called before a subsequent
 * call to region_add that will actually modify the reserve
 * map to add the specified range [f, t).  region_chg does
 * not change the number of huge pages represented by the
 * map.  However, if the existing regions in the map can not
 * be expanded to represent the new range, a new file_region
 * structure is added to the map as a placeholder.  This is
 * so that the subsequent region_add call will have all the
 * regions it needs and will not fail.
 *
 * Upon entry, region_chg will also examine the cache of region descriptors
 * associated with the map.  If there are not enough descriptors cached, one
 * will be allocated for the in progress add operation.
 *
 * Returns the number of huge pages that need to be added to the existing
 * reservation map for the range [f, t).  This number is greater or equal to
 * zero.  -ENOMEM is returned if a new file_region structure or cache entry
 * is needed and can not be allocated.
 */
static long region_chg(struct resv_map *resv, long f, long t)
{
	struct list_head *head = &resv->regions;
	struct file_region *rg, *nrg = NULL;
	long chg = 0;

retry:
	spin_lock(&resv->lock);
retry_locked:
	resv->adds_in_progress++;

	/*
	 * Check for sufficient descriptors in the cache to accommodate
	 * the number of in progress add operations.
	 */
	if (resv->adds_in_progress > resv->region_cache_count) {
		struct file_region *trg;

		VM_BUG_ON(resv->adds_in_progress - resv->region_cache_count > 1);
		/* Must drop lock to allocate a new descriptor. */
		resv->adds_in_progress--;
		spin_unlock(&resv->lock);

		trg = kmalloc(sizeof(*trg), GFP_KERNEL);
		if (!trg) {
			kfree(nrg);
			return -ENOMEM;
		}

		spin_lock(&resv->lock);
		list_add(&trg->link, &resv->region_cache);
		resv->region_cache_count++;
		goto retry_locked;
	}

	/* Locate the region we are before or in. */
	list_for_each_entry(rg, head, link)
		if (f <= rg->to)
			break;

	/* If we are below the current region then a new region is required.
	 * Subtle, allocate a new region at the position but make it zero
	 * size such that we can guarantee to record the reservation. */
	if (&rg->link == head || t < rg->from) {
		if (!nrg) {
			resv->adds_in_progress--;
			spin_unlock(&resv->lock);
			nrg = kmalloc(sizeof(*nrg), GFP_KERNEL);
			if (!nrg)
				return -ENOMEM;

			nrg->from = f;
			nrg->to   = f;
			INIT_LIST_HEAD(&nrg->link);
			goto retry;
		}

		list_add(&nrg->link, rg->link.prev);
		chg = t - f;
		goto out_nrg;
	}

	/* Round our left edge to the current segment if it encloses us. */
	if (f > rg->from)
		f = rg->from;
	chg = t - f;

	/* Check for and consume any regions we now overlap with. */
	list_for_each_entry(rg, rg->link.prev, link) {
		if (&rg->link == head)
			break;
		if (rg->from > t)
			goto out;

		/* We overlap with this area, if it extends further than
		 * us then we must extend ourselves.  Account for its
		 * existing reservation. */
		if (rg->to > t) {
			chg += rg->to - t;
			t = rg->to;
		}
		chg -= rg->to - rg->from;
	}

out:
	spin_unlock(&resv->lock);
	/*  We already know we raced and no longer need the new region */
	kfree(nrg);
	return chg;
out_nrg:
	spin_unlock(&resv->lock);
	return chg;
}

/*
 * Abort the in progress add operation.  The adds_in_progress field
 * of the resv_map keeps track of the operations in progress between
 * calls to region_chg and region_add.  Operations are sometimes
 * aborted after the call to region_chg.  In such cases, region_abort
 * is called to decrement the adds_in_progress counter.
 *
 * NOTE: The range arguments [f, t) are not needed or used in this
 * routine.  They are kept to make reading the calling code easier as
 * arguments will match the associated region_chg call.
 */
static void region_abort(struct resv_map *resv, long f, long t)
{
	spin_lock(&resv->lock);
	VM_BUG_ON(!resv->region_cache_count);
	resv->adds_in_progress--;
	spin_unlock(&resv->lock);
}

/*
 * Delete the specified range [f, t) from the reserve map.  If the
 * t parameter is LONG_MAX, this indicates that ALL regions after f
 * should be deleted.  Locate the regions which intersect [f, t)
 * and either trim, delete or split the existing regions.
 *
 * Returns the number of huge pages deleted from the reserve map.
 * In the normal case, the return value is zero or more.  In the
 * case where a region must be split, a new region descriptor must
 * be allocated.  If the allocation fails, -ENOMEM will be returned.
 * NOTE: If the parameter t == LONG_MAX, then we will never split
 * a region and possibly return -ENOMEM.  Callers specifying
 * t == LONG_MAX do not need to check for -ENOMEM error.
 */
static long region_del(struct resv_map *resv, long f, long t)
{
	struct list_head *head = &resv->regions;
	struct file_region *rg, *trg;
	struct file_region *nrg = NULL;
	long del = 0;

retry:
	spin_lock(&resv->lock);
	list_for_each_entry_safe(rg, trg, head, link) {
		/*
		 * Skip regions before the range to be deleted.  file_region
		 * ranges are normally of the form [from, to).  However, there
		 * may be a "placeholder" entry in the map which is of the form
		 * (from, to) with from == to.  Check for placeholder entries
		 * at the beginning of the range to be deleted.
		 */
		if (rg->to <= f && (rg->to != rg->from || rg->to != f))
			continue;

		if (rg->from >= t)
			break;

		if (f > rg->from && t < rg->to) { /* Must split region */
			/*
			 * Check for an entry in the cache before dropping
			 * lock and attempting allocation.
			 */
			if (!nrg &&
			    resv->region_cache_count > resv->adds_in_progress) {
				nrg = list_first_entry(&resv->region_cache,
							struct file_region,
							link);
				list_del(&nrg->link);
				resv->region_cache_count--;
			}

			if (!nrg) {
				spin_unlock(&resv->lock);
				nrg = kmalloc(sizeof(*nrg), GFP_KERNEL);
				if (!nrg)
					return -ENOMEM;
				goto retry;
			}

			del += t - f;

			/* New entry for end of split region */
			nrg->from = t;
			nrg->to = rg->to;
			INIT_LIST_HEAD(&nrg->link);

			/* Original entry is trimmed */
			rg->to = f;

			list_add(&nrg->link, &rg->link);
			nrg = NULL;
			break;
		}

		if (f <= rg->from && t >= rg->to) { /* Remove entire region */
			del += rg->to - rg->from;
			list_del(&rg->link);
			kfree(rg);
			continue;
		}

		if (f <= rg->from) {	/* Trim beginning of region */
			del += t - rg->from;
			rg->from = t;
		} else {		/* Trim end of region */
			del += rg->to - f;
			rg->to = f;
		}
	}

	spin_unlock(&resv->lock);
	kfree(nrg);
	return del;
}

/*
 * A rare out of memory error was encountered which prevented removal of
 * the reserve map region for a page.  The huge page itself was free'ed
 * and removed from the page cache.  This routine will adjust the subpool
 * usage count, and the global reserve count if needed.  By incrementing
 * these counts, the reserve map entry which could not be deleted will
 * appear as a "reserved" entry instead of simply dangling with incorrect
 * counts.
 */
void hugetlb_fix_reserve_counts(struct inode *inode)
{
	struct hugepage_subpool *spool = subpool_inode(inode);
	long rsv_adjust;

	rsv_adjust = hugepage_subpool_get_pages(spool, 1);
	if (rsv_adjust) {
		struct hstate *h = hstate_inode(inode);

		hugetlb_acct_memory(h, 1);
	}
}

/*
 * Count and return the number of huge pages in the reserve map
 * that intersect with the range [f, t).
 */
static long region_count(struct resv_map *resv, long f, long t)
{
	struct list_head *head = &resv->regions;
	struct file_region *rg;
	long chg = 0;

	spin_lock(&resv->lock);
	/* Locate each segment we overlap with, and count that overlap. */
	list_for_each_entry(rg, head, link) {
		long seg_from;
		long seg_to;

		if (rg->to <= f)
			continue;
		if (rg->from >= t)
			break;

		seg_from = max(rg->from, f);
		seg_to = min(rg->to, t);

		chg += seg_to - seg_from;
	}
	spin_unlock(&resv->lock);

	return chg;
}

/*
 * Convert the address within this vma to the page offset within
 * the mapping, in pagecache page units; huge pages here.
 */
static pgoff_t vma_hugecache_offset(struct hstate *h,
			struct vm_area_struct *vma, unsigned long address)
{
	return ((address - vma->vm_start) >> huge_page_shift(h)) +
			(vma->vm_pgoff >> huge_page_order(h));
}

pgoff_t linear_hugepage_index(struct vm_area_struct *vma,
				     unsigned long address)
{
	return vma_hugecache_offset(hstate_vma(vma), vma, address);
}
EXPORT_SYMBOL_GPL(linear_hugepage_index);

/*
 * Return the size of the pages allocated when backing a VMA. In the majority
 * cases this will be same size as used by the page table entries.
 */
unsigned long vma_kernel_pagesize(struct vm_area_struct *vma)
{
	struct hstate *hstate;

	if (!is_vm_hugetlb_page(vma))
		return PAGE_SIZE;

	hstate = hstate_vma(vma);

	return 1UL << huge_page_shift(hstate);
}
EXPORT_SYMBOL_GPL(vma_kernel_pagesize);

/*
 * Return the page size being used by the MMU to back a VMA. In the majority
 * of cases, the page size used by the kernel matches the MMU size. On
 * architectures where it differs, an architecture-specific version of this
 * function is required.
 */
#ifndef vma_mmu_pagesize
unsigned long vma_mmu_pagesize(struct vm_area_struct *vma)
{
	return vma_kernel_pagesize(vma);
}
#endif

/*
 * Flags for MAP_PRIVATE reservations.  These are stored in the bottom
 * bits of the reservation map pointer, which are always clear due to
 * alignment.
 */
#define HPAGE_RESV_OWNER    (1UL << 0)
#define HPAGE_RESV_UNMAPPED (1UL << 1)
#define HPAGE_RESV_MASK (HPAGE_RESV_OWNER | HPAGE_RESV_UNMAPPED)

/*
 * These helpers are used to track how many pages are reserved for
 * faults in a MAP_PRIVATE mapping. Only the process that called mmap()
 * is guaranteed to have their future faults succeed.
 *
 * With the exception of reset_vma_resv_huge_pages() which is called at fork(),
 * the reserve counters are updated with the hugetlb_lock held. It is safe
 * to reset the VMA at fork() time as it is not in use yet and there is no
 * chance of the global counters getting corrupted as a result of the values.
 *
 * The private mapping reservation is represented in a subtly different
 * manner to a shared mapping.  A shared mapping has a region map associated
 * with the underlying file, this region map represents the backing file
 * pages which have ever had a reservation assigned which this persists even
 * after the page is instantiated.  A private mapping has a region map
 * associated with the original mmap which is attached to all VMAs which
 * reference it, this region map represents those offsets which have consumed
 * reservation ie. where pages have been instantiated.
 */
static unsigned long get_vma_private_data(struct vm_area_struct *vma)
{
	return (unsigned long)vma->vm_private_data;
}

static void set_vma_private_data(struct vm_area_struct *vma,
							unsigned long value)
{
	vma->vm_private_data = (void *)value;
}

struct resv_map *resv_map_alloc(void)
{
	struct resv_map *resv_map = kmalloc(sizeof(*resv_map), GFP_KERNEL);
	struct file_region *rg = kmalloc(sizeof(*rg), GFP_KERNEL);

	if (!resv_map || !rg) {
		kfree(resv_map);
		kfree(rg);
		return NULL;
	}

	kref_init(&resv_map->refs);
	spin_lock_init(&resv_map->lock);
	INIT_LIST_HEAD(&resv_map->regions);

	resv_map->adds_in_progress = 0;

	INIT_LIST_HEAD(&resv_map->region_cache);
	list_add(&rg->link, &resv_map->region_cache);
	resv_map->region_cache_count = 1;

	return resv_map;
}

void resv_map_release(struct kref *ref)
{
	struct resv_map *resv_map = container_of(ref, struct resv_map, refs);
	struct list_head *head = &resv_map->region_cache;
	struct file_region *rg, *trg;

	/* Clear out any active regions before we release the map. */
	region_del(resv_map, 0, LONG_MAX);

	/* ... and any entries left in the cache */
	list_for_each_entry_safe(rg, trg, head, link) {
		list_del(&rg->link);
		kfree(rg);
	}

	VM_BUG_ON(resv_map->adds_in_progress);

	kfree(resv_map);
}

static inline struct resv_map *inode_resv_map(struct inode *inode)
{
	return inode->i_mapping->private_data;
}

static struct resv_map *vma_resv_map(struct vm_area_struct *vma)
{
	VM_BUG_ON_VMA(!is_vm_hugetlb_page(vma), vma);
	if (vma->vm_flags & VM_MAYSHARE) {
		struct address_space *mapping = vma->vm_file->f_mapping;
		struct inode *inode = mapping->host;

		return inode_resv_map(inode);

	} else {
		return (struct resv_map *)(get_vma_private_data(vma) &
							~HPAGE_RESV_MASK);
	}
}

static void set_vma_resv_map(struct vm_area_struct *vma, struct resv_map *map)
{
	VM_BUG_ON_VMA(!is_vm_hugetlb_page(vma), vma);
	VM_BUG_ON_VMA(vma->vm_flags & VM_MAYSHARE, vma);

	set_vma_private_data(vma, (get_vma_private_data(vma) &
				HPAGE_RESV_MASK) | (unsigned long)map);
}

static void set_vma_resv_flags(struct vm_area_struct *vma, unsigned long flags)
{
	VM_BUG_ON_VMA(!is_vm_hugetlb_page(vma), vma);
	VM_BUG_ON_VMA(vma->vm_flags & VM_MAYSHARE, vma);

	set_vma_private_data(vma, get_vma_private_data(vma) | flags);
}

static int is_vma_resv_set(struct vm_area_struct *vma, unsigned long flag)
{
	VM_BUG_ON_VMA(!is_vm_hugetlb_page(vma), vma);

	return (get_vma_private_data(vma) & flag) != 0;
}

/* Reset counters to 0 and clear all HPAGE_RESV_* flags */
void reset_vma_resv_huge_pages(struct vm_area_struct *vma)
{
	VM_BUG_ON_VMA(!is_vm_hugetlb_page(vma), vma);
	if (!(vma->vm_flags & VM_MAYSHARE))
		vma->vm_private_data = (void *)0;
}

/* Returns true if the VMA has associated reserve pages */
static bool vma_has_reserves(struct vm_area_struct *vma, long chg)
{
	if (vma->vm_flags & VM_NORESERVE) {
		/*
		 * This address is already reserved by other process(chg == 0),
		 * so, we should decrement reserved count. Without decrementing,
		 * reserve count remains after releasing inode, because this
		 * allocated page will go into page cache and is regarded as
		 * coming from reserved pool in releasing step.  Currently, we
		 * don't have any other solution to deal with this situation
		 * properly, so add work-around here.
		 */
		if (vma->vm_flags & VM_MAYSHARE && chg == 0)
			return true;
		else
			return false;
	}

	/* Shared mappings always use reserves */
	if (vma->vm_flags & VM_MAYSHARE) {
		/*
		 * We know VM_NORESERVE is not set.  Therefore, there SHOULD
		 * be a region map for all pages.  The only situation where
		 * there is no region map is if a hole was punched via
		 * fallocate.  In this case, there really are no reverves to
		 * use.  This situation is indicated if chg != 0.
		 */
		if (chg)
			return false;
		else
			return true;
	}

	/*
	 * Only the process that called mmap() has reserves for
	 * private mappings.
	 */
	if (is_vma_resv_set(vma, HPAGE_RESV_OWNER)) {
		/*
		 * Like the shared case above, a hole punch or truncate
		 * could have been performed on the private mapping.
		 * Examine the value of chg to determine if reserves
		 * actually exist or were previously consumed.
		 * Very Subtle - The value of chg comes from a previous
		 * call to vma_needs_reserves().  The reserve map for
		 * private mappings has different (opposite) semantics
		 * than that of shared mappings.  vma_needs_reserves()
		 * has already taken this difference in semantics into
		 * account.  Therefore, the meaning of chg is the same
		 * as in the shared case above.  Code could easily be
		 * combined, but keeping it separate draws attention to
		 * subtle differences.
		 */
		if (chg)
			return false;
		else
			return true;
	}

	return false;
}

static void enqueue_huge_page(struct hstate *h, struct page *page)
{
	int nid = page_to_nid(page);
	list_move(&page->lru, &h->hugepage_freelists[nid]);
	h->free_huge_pages++;
	h->free_huge_pages_node[nid]++;
}

static struct page *dequeue_huge_page_node(struct hstate *h, int nid)
{
	struct page *page;

	list_for_each_entry(page, &h->hugepage_freelists[nid], lru)
		if (!is_migrate_isolate_page(page))
			break;
	/*
	 * if 'non-isolated free hugepage' not found on the list,
	 * the allocation fails.
	 */
	if (&h->hugepage_freelists[nid] == &page->lru)
		return NULL;
	list_move(&page->lru, &h->hugepage_activelist);
	set_page_refcounted(page);
	h->free_huge_pages--;
	h->free_huge_pages_node[nid]--;
	return page;
}

/* Movability of hugepages depends on migration support. */
static inline gfp_t htlb_alloc_mask(struct hstate *h)
{
	if (hugepages_treat_as_movable || hugepage_migration_supported(h))
		return GFP_HIGHUSER_MOVABLE;
	else
		return GFP_HIGHUSER;
}

static struct page *dequeue_huge_page_vma(struct hstate *h,
				struct vm_area_struct *vma,
				unsigned long address, int avoid_reserve,
				long chg)
{
	struct page *page = NULL;
	struct mempolicy *mpol;
	nodemask_t *nodemask;
	struct zonelist *zonelist;
	struct zone *zone;
	struct zoneref *z;
	unsigned int cpuset_mems_cookie;

	/*
	 * A child process with MAP_PRIVATE mappings created by their parent
	 * have no page reserves. This check ensures that reservations are
	 * not "stolen". The child may still get SIGKILLed
	 */
	if (!vma_has_reserves(vma, chg) &&
			h->free_huge_pages - h->resv_huge_pages == 0)
		goto err;

	/* If reserves cannot be used, ensure enough pages are in the pool */
	if (avoid_reserve && h->free_huge_pages - h->resv_huge_pages == 0)
		goto err;

retry_cpuset:
	cpuset_mems_cookie = read_mems_allowed_begin();
	zonelist = huge_zonelist(vma, address,
					htlb_alloc_mask(h), &mpol, &nodemask);

	for_each_zone_zonelist_nodemask(zone, z, zonelist,
						MAX_NR_ZONES - 1, nodemask) {
		if (cpuset_zone_allowed(zone, htlb_alloc_mask(h))) {
			page = dequeue_huge_page_node(h, zone_to_nid(zone));
			if (page) {
				if (avoid_reserve)
					break;
				if (!vma_has_reserves(vma, chg))
					break;

				SetPagePrivate(page);
				h->resv_huge_pages--;
				break;
			}
		}
	}

	mpol_cond_put(mpol);
	if (unlikely(!page && read_mems_allowed_retry(cpuset_mems_cookie)))
		goto retry_cpuset;
	return page;

err:
	return NULL;
}

/*
 * common helper functions for hstate_next_node_to_{alloc|free}.
 * We may have allocated or freed a huge page based on a different
 * nodes_allowed previously, so h->next_node_to_{alloc|free} might
 * be outside of *nodes_allowed.  Ensure that we use an allowed
 * node for alloc or free.
 */
static int next_node_allowed(int nid, nodemask_t *nodes_allowed)
{
	nid = next_node_in(nid, *nodes_allowed);
	VM_BUG_ON(nid >= MAX_NUMNODES);

	return nid;
}

static int get_valid_node_allowed(int nid, nodemask_t *nodes_allowed)
{
	if (!node_isset(nid, *nodes_allowed))
		nid = next_node_allowed(nid, nodes_allowed);
	return nid;
}

/*
 * returns the previously saved node ["this node"] from which to
 * allocate a persistent huge page for the pool and advance the
 * next node from which to allocate, handling wrap at end of node
 * mask.
 */
static int hstate_next_node_to_alloc(struct hstate *h,
					nodemask_t *nodes_allowed)
{
	int nid;

	VM_BUG_ON(!nodes_allowed);

	nid = get_valid_node_allowed(h->next_nid_to_alloc, nodes_allowed);
	h->next_nid_to_alloc = next_node_allowed(nid, nodes_allowed);

	return nid;
}

/*
 * helper for free_pool_huge_page() - return the previously saved
 * node ["this node"] from which to free a huge page.  Advance the
 * next node id whether or not we find a free huge page to free so
 * that the next attempt to free addresses the next node.
 */
static int hstate_next_node_to_free(struct hstate *h, nodemask_t *nodes_allowed)
{
	int nid;

	VM_BUG_ON(!nodes_allowed);

	nid = get_valid_node_allowed(h->next_nid_to_free, nodes_allowed);
	h->next_nid_to_free = next_node_allowed(nid, nodes_allowed);

	return nid;
}

#define for_each_node_mask_to_alloc(hs, nr_nodes, node, mask)		\
	for (nr_nodes = nodes_weight(*mask);				\
		nr_nodes > 0 &&						\
		((node = hstate_next_node_to_alloc(hs, mask)) || 1);	\
		nr_nodes--)

#define for_each_node_mask_to_free(hs, nr_nodes, node, mask)		\
	for (nr_nodes = nodes_weight(*mask);				\
		nr_nodes > 0 &&						\
		((node = hstate_next_node_to_free(hs, mask)) || 1);	\
		nr_nodes--)

#if defined(CONFIG_ARCH_HAS_GIGANTIC_PAGE) && \
	((defined(CONFIG_MEMORY_ISOLATION) && defined(CONFIG_COMPACTION)) || \
	defined(CONFIG_CMA))
static void destroy_compound_gigantic_page(struct page *page,
					unsigned int order)
{
	int i;
	int nr_pages = 1 << order;
	struct page *p = page + 1;

	atomic_set(compound_mapcount_ptr(page), 0);
	for (i = 1; i < nr_pages; i++, p = mem_map_next(p, page, i)) {
		clear_compound_head(p);
		set_page_refcounted(p);
	}

	set_compound_order(page, 0);
	__ClearPageHead(page);
}

static void free_gigantic_page(struct page *page, unsigned int order)
{
	free_contig_range(page_to_pfn(page), 1 << order);
}

static int __alloc_gigantic_page(unsigned long start_pfn,
				unsigned long nr_pages)
{
	unsigned long end_pfn = start_pfn + nr_pages;
	return alloc_contig_range(start_pfn, end_pfn, MIGRATE_MOVABLE,
				  GFP_KERNEL);
}

static bool pfn_range_valid_gigantic(struct zone *z,
			unsigned long start_pfn, unsigned long nr_pages)
{
	unsigned long i, end_pfn = start_pfn + nr_pages;
	struct page *page;

	for (i = start_pfn; i < end_pfn; i++) {
		if (!pfn_valid(i))
			return false;

		page = pfn_to_page(i);

		if (page_zone(page) != z)
			return false;

		if (PageReserved(page))
			return false;

		if (page_count(page) > 0)
			return false;

		if (PageHuge(page))
			return false;
	}

	return true;
}

static bool zone_spans_last_pfn(const struct zone *zone,
			unsigned long start_pfn, unsigned long nr_pages)
{
	unsigned long last_pfn = start_pfn + nr_pages - 1;
	return zone_spans_pfn(zone, last_pfn);
}

static struct page *alloc_gigantic_page(int nid, unsigned int order)
{
	unsigned long nr_pages = 1 << order;
	unsigned long ret, pfn, flags;
	struct zone *z;

	z = NODE_DATA(nid)->node_zones;
	for (; z - NODE_DATA(nid)->node_zones < MAX_NR_ZONES; z++) {
		spin_lock_irqsave(&z->lock, flags);

		pfn = ALIGN(z->zone_start_pfn, nr_pages);
		while (zone_spans_last_pfn(z, pfn, nr_pages)) {
			if (pfn_range_valid_gigantic(z, pfn, nr_pages)) {
				/*
				 * We release the zone lock here because
				 * alloc_contig_range() will also lock the zone
				 * at some point. If there's an allocation
				 * spinning on this lock, it may win the race
				 * and cause alloc_contig_range() to fail...
				 */
				spin_unlock_irqrestore(&z->lock, flags);
				ret = __alloc_gigantic_page(pfn, nr_pages);
				if (!ret)
					return pfn_to_page(pfn);
				spin_lock_irqsave(&z->lock, flags);
			}
			pfn += nr_pages;
		}

		spin_unlock_irqrestore(&z->lock, flags);
	}

	return NULL;
}

static void prep_new_huge_page(struct hstate *h, struct page *page, int nid);
static void prep_compound_gigantic_page(struct page *page, unsigned int order);

static struct page *alloc_fresh_gigantic_page_node(struct hstate *h, int nid)
{
	struct page *page;

	page = alloc_gigantic_page(nid, huge_page_order(h));
	if (page) {
		prep_compound_gigantic_page(page, huge_page_order(h));
		prep_new_huge_page(h, page, nid);
	}

	return page;
}

static int alloc_fresh_gigantic_page(struct hstate *h,
				nodemask_t *nodes_allowed)
{
	struct page *page = NULL;
	int nr_nodes, node;

	for_each_node_mask_to_alloc(h, nr_nodes, node, nodes_allowed) {
		page = alloc_fresh_gigantic_page_node(h, node);
		if (page)
			return 1;
	}

	return 0;
}

static inline bool gigantic_page_supported(void) { return true; }
#else
static inline bool gigantic_page_supported(void) { return false; }
static inline void free_gigantic_page(struct page *page, unsigned int order) { }
static inline void destroy_compound_gigantic_page(struct page *page,
						unsigned int order) { }
static inline int alloc_fresh_gigantic_page(struct hstate *h,
					nodemask_t *nodes_allowed) { return 0; }
#endif

static void update_and_free_page(struct hstate *h, struct page *page)
{
	int i;

	if (hstate_is_gigantic(h) && !gigantic_page_supported())
		return;

	h->nr_huge_pages--;
	h->nr_huge_pages_node[page_to_nid(page)]--;
	for (i = 0; i < pages_per_huge_page(h); i++) {
		page[i].flags &= ~(1 << PG_locked | 1 << PG_error |
				1 << PG_referenced | 1 << PG_dirty |
				1 << PG_active | 1 << PG_private |
				1 << PG_writeback);
	}
	VM_BUG_ON_PAGE(hugetlb_cgroup_from_page(page), page);
	set_compound_page_dtor(page, NULL_COMPOUND_DTOR);
	set_page_refcounted(page);
	if (hstate_is_gigantic(h)) {
		destroy_compound_gigantic_page(page, huge_page_order(h));
		free_gigantic_page(page, huge_page_order(h));
	} else {
		__free_pages(page, huge_page_order(h));
	}
}

struct hstate *size_to_hstate(unsigned long size)
{
	struct hstate *h;

	for_each_hstate(h) {
		if (huge_page_size(h) == size)
			return h;
	}
	return NULL;
}

/*
 * Test to determine whether the hugepage is "active/in-use" (i.e. being linked
 * to hstate->hugepage_activelist.)
 *
 * This function can be called for tail pages, but never returns true for them.
 */
bool page_huge_active(struct page *page)
{
	VM_BUG_ON_PAGE(!PageHuge(page), page);
	return PageHead(page) && PagePrivate(&page[1]);
}

/* never called for tail page */
static void set_page_huge_active(struct page *page)
{
	VM_BUG_ON_PAGE(!PageHeadHuge(page), page);
	SetPagePrivate(&page[1]);
}

static void clear_page_huge_active(struct page *page)
{
	VM_BUG_ON_PAGE(!PageHeadHuge(page), page);
	ClearPagePrivate(&page[1]);
}

void free_huge_page(struct page *page)
{
	/*
	 * Can't pass hstate in here because it is called from the
	 * compound page destructor.
	 */
	struct hstate *h = page_hstate(page);
	int nid = page_to_nid(page);
	struct hugepage_subpool *spool =
		(struct hugepage_subpool *)page_private(page);
	bool restore_reserve;

	set_page_private(page, 0);
	page->mapping = NULL;
	VM_BUG_ON_PAGE(page_count(page), page);
	VM_BUG_ON_PAGE(page_mapcount(page), page);
	restore_reserve = PagePrivate(page);
	ClearPagePrivate(page);

	/*
	 * A return code of zero implies that the subpool will be under its
	 * minimum size if the reservation is not restored after page is free.
	 * Therefore, force restore_reserve operation.
	 */
	if (hugepage_subpool_put_pages(spool, 1) == 0)
		restore_reserve = true;

	spin_lock(&hugetlb_lock);
	clear_page_huge_active(page);
	hugetlb_cgroup_uncharge_page(hstate_index(h),
				     pages_per_huge_page(h), page);
	if (restore_reserve)
		h->resv_huge_pages++;

	if (h->surplus_huge_pages_node[nid]) {
		/* remove the page from active list */
		list_del(&page->lru);
		update_and_free_page(h, page);
		h->surplus_huge_pages--;
		h->surplus_huge_pages_node[nid]--;
	} else {
		arch_clear_hugepage_flags(page);
		enqueue_huge_page(h, page);
	}
	spin_unlock(&hugetlb_lock);
}

static void prep_new_huge_page(struct hstate *h, struct page *page, int nid)
{
	INIT_LIST_HEAD(&page->lru);
	set_compound_page_dtor(page, HUGETLB_PAGE_DTOR);
	spin_lock(&hugetlb_lock);
	set_hugetlb_cgroup(page, NULL);
	h->nr_huge_pages++;
	h->nr_huge_pages_node[nid]++;
	spin_unlock(&hugetlb_lock);
	put_page(page); /* free it into the hugepage allocator */
}

static void prep_compound_gigantic_page(struct page *page, unsigned int order)
{
	int i;
	int nr_pages = 1 << order;
	struct page *p = page + 1;

	/* we rely on prep_new_huge_page to set the destructor */
	set_compound_order(page, order);
	__ClearPageReserved(page);
	__SetPageHead(page);
	for (i = 1; i < nr_pages; i++, p = mem_map_next(p, page, i)) {
		/*
		 * For gigantic hugepages allocated through bootmem at
		 * boot, it's safer to be consistent with the not-gigantic
		 * hugepages and clear the PG_reserved bit from all tail pages
		 * too.  Otherwse drivers using get_user_pages() to access tail
		 * pages may get the reference counting wrong if they see
		 * PG_reserved set on a tail page (despite the head page not
		 * having PG_reserved set).  Enforcing this consistency between
		 * head and tail pages allows drivers to optimize away a check
		 * on the head page when they need know if put_page() is needed
		 * after get_user_pages().
		 */
		__ClearPageReserved(p);
		set_page_count(p, 0);
		set_compound_head(p, page);
	}
	atomic_set(compound_mapcount_ptr(page), -1);
}

/*
 * PageHuge() only returns true for hugetlbfs pages, but not for normal or
 * transparent huge pages.  See the PageTransHuge() documentation for more
 * details.
 */
int PageHuge(struct page *page)
{
	if (!PageCompound(page))
		return 0;

	page = compound_head(page);
	return page[1].compound_dtor == HUGETLB_PAGE_DTOR;
}
EXPORT_SYMBOL_GPL(PageHuge);

/*
 * PageHeadHuge() only returns true for hugetlbfs head page, but not for
 * normal or transparent huge pages.
 */
int PageHeadHuge(struct page *page_head)
{
	if (!PageHead(page_head))
		return 0;

	return get_compound_page_dtor(page_head) == free_huge_page;
}

pgoff_t __basepage_index(struct page *page)
{
	struct page *page_head = compound_head(page);
	pgoff_t index = page_index(page_head);
	unsigned long compound_idx;

	if (!PageHuge(page_head))
		return page_index(page);

	if (compound_order(page_head) >= MAX_ORDER)
		compound_idx = page_to_pfn(page) - page_to_pfn(page_head);
	else
		compound_idx = page - page_head;

	return (index << compound_order(page_head)) + compound_idx;
}

static struct page *alloc_fresh_huge_page_node(struct hstate *h, int nid)
{
	struct page *page;

	page = __alloc_pages_node(nid,
		htlb_alloc_mask(h)|__GFP_COMP|__GFP_THISNODE|
						__GFP_REPEAT|__GFP_NOWARN,
		huge_page_order(h));
	if (page) {
		prep_new_huge_page(h, page, nid);
	}

	return page;
}

static int alloc_fresh_huge_page(struct hstate *h, nodemask_t *nodes_allowed)
{
	struct page *page;
	int nr_nodes, node;
	int ret = 0;

	for_each_node_mask_to_alloc(h, nr_nodes, node, nodes_allowed) {
		page = alloc_fresh_huge_page_node(h, node);
		if (page) {
			ret = 1;
			break;
		}
	}

	if (ret)
		count_vm_event(HTLB_BUDDY_PGALLOC);
	else
		count_vm_event(HTLB_BUDDY_PGALLOC_FAIL);

	return ret;
}

/*
 * Free huge page from pool from next node to free.
 * Attempt to keep persistent huge pages more or less
 * balanced over allowed nodes.
 * Called with hugetlb_lock locked.
 */
static int free_pool_huge_page(struct hstate *h, nodemask_t *nodes_allowed,
							 bool acct_surplus)
{
	int nr_nodes, node;
	int ret = 0;

	for_each_node_mask_to_free(h, nr_nodes, node, nodes_allowed) {
		/*
		 * If we're returning unused surplus pages, only examine
		 * nodes with surplus pages.
		 */
		if ((!acct_surplus || h->surplus_huge_pages_node[node]) &&
		    !list_empty(&h->hugepage_freelists[node])) {
			struct page *page =
				list_entry(h->hugepage_freelists[node].next,
					  struct page, lru);
			list_del(&page->lru);
			h->free_huge_pages--;
			h->free_huge_pages_node[node]--;
			if (acct_surplus) {
				h->surplus_huge_pages--;
				h->surplus_huge_pages_node[node]--;
			}
			update_and_free_page(h, page);
			ret = 1;
			break;
		}
	}

	return ret;
}

/*
 * Dissolve a given free hugepage into free buddy pages. This function does
 * nothing for in-use (including surplus) hugepages. Returns -EBUSY if the
 * number of free hugepages would be reduced below the number of reserved
 * hugepages.
 */
static int dissolve_free_huge_page(struct page *page)
{
	int rc = 0;

	spin_lock(&hugetlb_lock);
	if (PageHuge(page) && !page_count(page)) {
		struct page *head = compound_head(page);
		struct hstate *h = page_hstate(head);
		int nid = page_to_nid(head);
		if (h->free_huge_pages - h->resv_huge_pages == 0) {
			rc = -EBUSY;
			goto out;
		}
		list_del(&head->lru);
		h->free_huge_pages--;
		h->free_huge_pages_node[nid]--;
		h->max_huge_pages--;
		update_and_free_page(h, head);
	}
out:
	spin_unlock(&hugetlb_lock);
	return rc;
}

/*
 * Dissolve free hugepages in a given pfn range. Used by memory hotplug to
 * make specified memory blocks removable from the system.
 * Note that this will dissolve a free gigantic hugepage completely, if any
 * part of it lies within the given range.
 * Also note that if dissolve_free_huge_page() returns with an error, all
 * free hugepages that were dissolved before that error are lost.
 */
int dissolve_free_huge_pages(unsigned long start_pfn, unsigned long end_pfn)
{
	unsigned long pfn;
	struct page *page;
	int rc = 0;

	if (!hugepages_supported())
		return rc;

	for (pfn = start_pfn; pfn < end_pfn; pfn += 1 << minimum_order) {
		page = pfn_to_page(pfn);
		if (PageHuge(page) && !page_count(page)) {
			rc = dissolve_free_huge_page(page);
			if (rc)
				break;
		}
	}

	return rc;
}

/*
 * There are 3 ways this can get called:
 * 1. With vma+addr: we use the VMA's memory policy
 * 2. With !vma, but nid=NUMA_NO_NODE:  We try to allocate a huge
 *    page from any node, and let the buddy allocator itself figure
 *    it out.
 * 3. With !vma, but nid!=NUMA_NO_NODE.  We allocate a huge page
 *    strictly from 'nid'
 */
static struct page *__hugetlb_alloc_buddy_huge_page(struct hstate *h,
		struct vm_area_struct *vma, unsigned long addr, int nid)
{
	int order = huge_page_order(h);
	gfp_t gfp = htlb_alloc_mask(h)|__GFP_COMP|__GFP_REPEAT|__GFP_NOWARN;
	unsigned int cpuset_mems_cookie;

	/*
	 * We need a VMA to get a memory policy.  If we do not
	 * have one, we use the 'nid' argument.
	 *
	 * The mempolicy stuff below has some non-inlined bits
	 * and calls ->vm_ops.  That makes it hard to optimize at
	 * compile-time, even when NUMA is off and it does
	 * nothing.  This helps the compiler optimize it out.
	 */
	if (!IS_ENABLED(CONFIG_NUMA) || !vma) {
		/*
		 * If a specific node is requested, make sure to
		 * get memory from there, but only when a node
		 * is explicitly specified.
		 */
		if (nid != NUMA_NO_NODE)
			gfp |= __GFP_THISNODE;
		/*
		 * Make sure to call something that can handle
		 * nid=NUMA_NO_NODE
		 */
		return alloc_pages_node(nid, gfp, order);
	}

	/*
	 * OK, so we have a VMA.  Fetch the mempolicy and try to
	 * allocate a huge page with it.  We will only reach this
	 * when CONFIG_NUMA=y.
	 */
	do {
		struct page *page;
		struct mempolicy *mpol;
		struct zonelist *zl;
		nodemask_t *nodemask;

		cpuset_mems_cookie = read_mems_allowed_begin();
		zl = huge_zonelist(vma, addr, gfp, &mpol, &nodemask);
		mpol_cond_put(mpol);
		page = __alloc_pages_nodemask(gfp, order, zl, nodemask);
		if (page)
			return page;
	} while (read_mems_allowed_retry(cpuset_mems_cookie));

	return NULL;
}

/*
 * There are two ways to allocate a huge page:
 * 1. When you have a VMA and an address (like a fault)
 * 2. When you have no VMA (like when setting /proc/.../nr_hugepages)
 *
 * 'vma' and 'addr' are only for (1).  'nid' is always NUMA_NO_NODE in
 * this case which signifies that the allocation should be done with
 * respect for the VMA's memory policy.
 *
 * For (2), we ignore 'vma' and 'addr' and use 'nid' exclusively. This
 * implies that memory policies will not be taken in to account.
 */
static struct page *__alloc_buddy_huge_page(struct hstate *h,
		struct vm_area_struct *vma, unsigned long addr, int nid)
{
	struct page *page;
	unsigned int r_nid;

	if (hstate_is_gigantic(h))
		return NULL;

	/*
	 * Make sure that anyone specifying 'nid' is not also specifying a VMA.
	 * This makes sure the caller is picking _one_ of the modes with which
	 * we can call this function, not both.
	 */
	if (vma || (addr != -1)) {
		VM_WARN_ON_ONCE(addr == -1);
		VM_WARN_ON_ONCE(nid != NUMA_NO_NODE);
	}
	/*
	 * Assume we will successfully allocate the surplus page to
	 * prevent racing processes from causing the surplus to exceed
	 * overcommit
	 *
	 * This however introduces a different race, where a process B
	 * tries to grow the static hugepage pool while alloc_pages() is
	 * called by process A. B will only examine the per-node
	 * counters in determining if surplus huge pages can be
	 * converted to normal huge pages in adjust_pool_surplus(). A
	 * won't be able to increment the per-node counter, until the
	 * lock is dropped by B, but B doesn't drop hugetlb_lock until
	 * no more huge pages can be converted from surplus to normal
	 * state (and doesn't try to convert again). Thus, we have a
	 * case where a surplus huge page exists, the pool is grown, and
	 * the surplus huge page still exists after, even though it
	 * should just have been converted to a normal huge page. This
	 * does not leak memory, though, as the hugepage will be freed
	 * once it is out of use. It also does not allow the counters to
	 * go out of whack in adjust_pool_surplus() as we don't modify
	 * the node values until we've gotten the hugepage and only the
	 * per-node value is checked there.
	 */
	spin_lock(&hugetlb_lock);
	if (h->surplus_huge_pages >= h->nr_overcommit_huge_pages) {
		spin_unlock(&hugetlb_lock);
		return NULL;
	} else {
		h->nr_huge_pages++;
		h->surplus_huge_pages++;
	}
	spin_unlock(&hugetlb_lock);

	page = __hugetlb_alloc_buddy_huge_page(h, vma, addr, nid);

	spin_lock(&hugetlb_lock);
	if (page) {
		INIT_LIST_HEAD(&page->lru);
		r_nid = page_to_nid(page);
		set_compound_page_dtor(page, HUGETLB_PAGE_DTOR);
		set_hugetlb_cgroup(page, NULL);
		/*
		 * We incremented the global counters already
		 */
		h->nr_huge_pages_node[r_nid]++;
		h->surplus_huge_pages_node[r_nid]++;
		__count_vm_event(HTLB_BUDDY_PGALLOC);
	} else {
		h->nr_huge_pages--;
		h->surplus_huge_pages--;
		__count_vm_event(HTLB_BUDDY_PGALLOC_FAIL);
	}
	spin_unlock(&hugetlb_lock);

	return page;
}

/*
 * Allocate a huge page from 'nid'.  Note, 'nid' may be
 * NUMA_NO_NODE, which means that it may be allocated
 * anywhere.
 */
static
struct page *__alloc_buddy_huge_page_no_mpol(struct hstate *h, int nid)
{
	unsigned long addr = -1;

	return __alloc_buddy_huge_page(h, NULL, addr, nid);
}

/*
 * Use the VMA's mpolicy to allocate a huge page from the buddy.
 */
static
struct page *__alloc_buddy_huge_page_with_mpol(struct hstate *h,
		struct vm_area_struct *vma, unsigned long addr)
{
	return __alloc_buddy_huge_page(h, vma, addr, NUMA_NO_NODE);
}

/*
 * This allocation function is useful in the context where vma is irrelevant.
 * E.g. soft-offlining uses this function because it only cares physical
 * address of error page.
 */
struct page *alloc_huge_page_node(struct hstate *h, int nid)
{
	struct page *page = NULL;

	spin_lock(&hugetlb_lock);
	if (h->free_huge_pages - h->resv_huge_pages > 0)
		page = dequeue_huge_page_node(h, nid);
	spin_unlock(&hugetlb_lock);

	if (!page)
		page = __alloc_buddy_huge_page_no_mpol(h, nid);

	return page;
}

/*
 * Increase the hugetlb pool such that it can accommodate a reservation
 * of size 'delta'.
 */
static int gather_surplus_pages(struct hstate *h, int delta)
{
	struct list_head surplus_list;
	struct page *page, *tmp;
	int ret, i;
	int needed, allocated;
	bool alloc_ok = true;

	needed = (h->resv_huge_pages + delta) - h->free_huge_pages;
	if (needed <= 0) {
		h->resv_huge_pages += delta;
		return 0;
	}

	allocated = 0;
	INIT_LIST_HEAD(&surplus_list);

	ret = -ENOMEM;
retry:
	spin_unlock(&hugetlb_lock);
	for (i = 0; i < needed; i++) {
		page = __alloc_buddy_huge_page_no_mpol(h, NUMA_NO_NODE);
		if (!page) {
			alloc_ok = false;
			break;
		}
		list_add(&page->lru, &surplus_list);
	}
	allocated += i;

	/*
	 * After retaking hugetlb_lock, we need to recalculate 'needed'
	 * because either resv_huge_pages or free_huge_pages may have changed.
	 */
	spin_lock(&hugetlb_lock);
	needed = (h->resv_huge_pages + delta) -
			(h->free_huge_pages + allocated);
	if (needed > 0) {
		if (alloc_ok)
			goto retry;
		/*
		 * We were not able to allocate enough pages to
		 * satisfy the entire reservation so we free what
		 * we've allocated so far.
		 */
		goto free;
	}
	/*
	 * The surplus_list now contains _at_least_ the number of extra pages
	 * needed to accommodate the reservation.  Add the appropriate number
	 * of pages to the hugetlb pool and free the extras back to the buddy
	 * allocator.  Commit the entire reservation here to prevent another
	 * process from stealing the pages as they are added to the pool but
	 * before they are reserved.
	 */
	needed += allocated;
	h->resv_huge_pages += delta;
	ret = 0;

	/* Free the needed pages to the hugetlb pool */
	list_for_each_entry_safe(page, tmp, &surplus_list, lru) {
		if ((--needed) < 0)
			break;
		/*
		 * This page is now managed by the hugetlb allocator and has
		 * no users -- drop the buddy allocator's reference.
		 */
		put_page_testzero(page);
		VM_BUG_ON_PAGE(page_count(page), page);
		enqueue_huge_page(h, page);
	}
free:
	spin_unlock(&hugetlb_lock);

	/* Free unnecessary surplus pages to the buddy allocator */
	list_for_each_entry_safe(page, tmp, &surplus_list, lru)
		put_page(page);
	spin_lock(&hugetlb_lock);

	return ret;
}

/*
 * This routine has two main purposes:
 * 1) Decrement the reservation count (resv_huge_pages) by the value passed
 *    in unused_resv_pages.  This corresponds to the prior adjustments made
 *    to the associated reservation map.
 * 2) Free any unused surplus pages that may have been allocated to satisfy
 *    the reservation.  As many as unused_resv_pages may be freed.
 *
 * Called with hugetlb_lock held.  However, the lock could be dropped (and
 * reacquired) during calls to cond_resched_lock.  Whenever dropping the lock,
 * we must make sure nobody else can claim pages we are in the process of
 * freeing.  Do this by ensuring resv_huge_page always is greater than the
 * number of huge pages we plan to free when dropping the lock.
 */
static void return_unused_surplus_pages(struct hstate *h,
					unsigned long unused_resv_pages)
{
	unsigned long nr_pages;

	/* Cannot return gigantic pages currently */
	if (hstate_is_gigantic(h))
		goto out;

	/*
	 * Part (or even all) of the reservation could have been backed
	 * by pre-allocated pages. Only free surplus pages.
	 */
	nr_pages = min(unused_resv_pages, h->surplus_huge_pages);

	/*
	 * We want to release as many surplus pages as possible, spread
	 * evenly across all nodes with memory. Iterate across these nodes
	 * until we can no longer free unreserved surplus pages. This occurs
	 * when the nodes with surplus pages have no free pages.
	 * free_pool_huge_page() will balance the the freed pages across the
	 * on-line nodes with memory and will handle the hstate accounting.
	 *
	 * Note that we decrement resv_huge_pages as we free the pages.  If
	 * we drop the lock, resv_huge_pages will still be sufficiently large
	 * to cover subsequent pages we may free.
	 */
	while (nr_pages--) {
		h->resv_huge_pages--;
		unused_resv_pages--;
		if (!free_pool_huge_page(h, &node_states[N_MEMORY], 1))
			goto out;
		cond_resched_lock(&hugetlb_lock);
	}

out:
	/* Fully uncommit the reservation */
	h->resv_huge_pages -= unused_resv_pages;
}


/*
 * vma_needs_reservation, vma_commit_reservation and vma_end_reservation
 * are used by the huge page allocation routines to manage reservations.
 *
 * vma_needs_reservation is called to determine if the huge page at addr
 * within the vma has an associated reservation.  If a reservation is
 * needed, the value 1 is returned.  The caller is then responsible for
 * managing the global reservation and subpool usage counts.  After
 * the huge page has been allocated, vma_commit_reservation is called
 * to add the page to the reservation map.  If the page allocation fails,
 * the reservation must be ended instead of committed.  vma_end_reservation
 * is called in such cases.
 *
 * In the normal case, vma_commit_reservation returns the same value
 * as the preceding vma_needs_reservation call.  The only time this
 * is not the case is if a reserve map was changed between calls.  It
 * is the responsibility of the caller to notice the difference and
 * take appropriate action.
 *
 * vma_add_reservation is used in error paths where a reservation must
 * be restored when a newly allocated huge page must be freed.  It is
 * to be called after calling vma_needs_reservation to determine if a
 * reservation exists.
 */
enum vma_resv_mode {
	VMA_NEEDS_RESV,
	VMA_COMMIT_RESV,
	VMA_END_RESV,
	VMA_ADD_RESV,
};
static long __vma_reservation_common(struct hstate *h,
				struct vm_area_struct *vma, unsigned long addr,
				enum vma_resv_mode mode)
{
	struct resv_map *resv;
	pgoff_t idx;
	long ret;

	resv = vma_resv_map(vma);
	if (!resv)
		return 1;

	idx = vma_hugecache_offset(h, vma, addr);
	switch (mode) {
	case VMA_NEEDS_RESV:
		ret = region_chg(resv, idx, idx + 1);
		break;
	case VMA_COMMIT_RESV:
		ret = region_add(resv, idx, idx + 1);
		break;
	case VMA_END_RESV:
		region_abort(resv, idx, idx + 1);
		ret = 0;
		break;
	case VMA_ADD_RESV:
		if (vma->vm_flags & VM_MAYSHARE)
			ret = region_add(resv, idx, idx + 1);
		else {
			region_abort(resv, idx, idx + 1);
			ret = region_del(resv, idx, idx + 1);
		}
		break;
	default:
		BUG();
	}

	if (vma->vm_flags & VM_MAYSHARE)
		return ret;
	else if (is_vma_resv_set(vma, HPAGE_RESV_OWNER) && ret >= 0) {
		/*
		 * In most cases, reserves always exist for private mappings.
		 * However, a file associated with mapping could have been
		 * hole punched or truncated after reserves were consumed.
		 * As subsequent fault on such a range will not use reserves.
		 * Subtle - The reserve map for private mappings has the
		 * opposite meaning than that of shared mappings.  If NO
		 * entry is in the reserve map, it means a reservation exists.
		 * If an entry exists in the reserve map, it means the
		 * reservation has already been consumed.  As a result, the
		 * return value of this routine is the opposite of the
		 * value returned from reserve map manipulation routines above.
		 */
		if (ret)
			return 0;
		else
			return 1;
	}
	else
		return ret < 0 ? ret : 0;
}

static long vma_needs_reservation(struct hstate *h,
			struct vm_area_struct *vma, unsigned long addr)
{
	return __vma_reservation_common(h, vma, addr, VMA_NEEDS_RESV);
}

static long vma_commit_reservation(struct hstate *h,
			struct vm_area_struct *vma, unsigned long addr)
{
	return __vma_reservation_common(h, vma, addr, VMA_COMMIT_RESV);
}

static void vma_end_reservation(struct hstate *h,
			struct vm_area_struct *vma, unsigned long addr)
{
	(void)__vma_reservation_common(h, vma, addr, VMA_END_RESV);
}

static long vma_add_reservation(struct hstate *h,
			struct vm_area_struct *vma, unsigned long addr)
{
	return __vma_reservation_common(h, vma, addr, VMA_ADD_RESV);
}

/*
 * This routine is called to restore a reservation on error paths.  In the
 * specific error paths, a huge page was allocated (via alloc_huge_page)
 * and is about to be freed.  If a reservation for the page existed,
 * alloc_huge_page would have consumed the reservation and set PagePrivate
 * in the newly allocated page.  When the page is freed via free_huge_page,
 * the global reservation count will be incremented if PagePrivate is set.
 * However, free_huge_page can not adjust the reserve map.  Adjust the
 * reserve map here to be consistent with global reserve count adjustments
 * to be made by free_huge_page.
 */
static void restore_reserve_on_error(struct hstate *h,
			struct vm_area_struct *vma, unsigned long address,
			struct page *page)
{
	if (unlikely(PagePrivate(page))) {
		long rc = vma_needs_reservation(h, vma, address);

		if (unlikely(rc < 0)) {
			/*
			 * Rare out of memory condition in reserve map
			 * manipulation.  Clear PagePrivate so that
			 * global reserve count will not be incremented
			 * by free_huge_page.  This will make it appear
			 * as though the reservation for this page was
			 * consumed.  This may prevent the task from
			 * faulting in the page at a later time.  This
			 * is better than inconsistent global huge page
			 * accounting of reserve counts.
			 */
			ClearPagePrivate(page);
		} else if (rc) {
			rc = vma_add_reservation(h, vma, address);
			if (unlikely(rc < 0))
				/*
				 * See above comment about rare out of
				 * memory condition.
				 */
				ClearPagePrivate(page);
		} else
			vma_end_reservation(h, vma, address);
	}
}

struct page *alloc_huge_page(struct vm_area_struct *vma,
				    unsigned long addr, int avoid_reserve)
{
	struct hugepage_subpool *spool = subpool_vma(vma);
	struct hstate *h = hstate_vma(vma);
	struct page *page;
	long map_chg, map_commit;
	long gbl_chg;
	int ret, idx;
	struct hugetlb_cgroup *h_cg;

	idx = hstate_index(h);
	/*
	 * Examine the region/reserve map to determine if the process
	 * has a reservation for the page to be allocated.  A return
	 * code of zero indicates a reservation exists (no change).
	 */
	map_chg = gbl_chg = vma_needs_reservation(h, vma, addr);
	if (map_chg < 0)
		return ERR_PTR(-ENOMEM);

	/*
	 * Processes that did not create the mapping will have no
	 * reserves as indicated by the region/reserve map. Check
	 * that the allocation will not exceed the subpool limit.
	 * Allocations for MAP_NORESERVE mappings also need to be
	 * checked against any subpool limit.
	 */
	if (map_chg || avoid_reserve) {
		gbl_chg = hugepage_subpool_get_pages(spool, 1);
		if (gbl_chg < 0) {
			vma_end_reservation(h, vma, addr);
			return ERR_PTR(-ENOSPC);
		}

		/*
		 * Even though there was no reservation in the region/reserve
		 * map, there could be reservations associated with the
		 * subpool that can be used.  This would be indicated if the
		 * return value of hugepage_subpool_get_pages() is zero.
		 * However, if avoid_reserve is specified we still avoid even
		 * the subpool reservations.
		 */
		if (avoid_reserve)
			gbl_chg = 1;
	}

	ret = hugetlb_cgroup_charge_cgroup(idx, pages_per_huge_page(h), &h_cg);
	if (ret)
		goto out_subpool_put;

	spin_lock(&hugetlb_lock);
	/*
	 * glb_chg is passed to indicate whether or not a page must be taken
	 * from the global free pool (global change).  gbl_chg == 0 indicates
	 * a reservation exists for the allocation.
	 */
	page = dequeue_huge_page_vma(h, vma, addr, avoid_reserve, gbl_chg);
	if (!page) {
		spin_unlock(&hugetlb_lock);
		page = __alloc_buddy_huge_page_with_mpol(h, vma, addr);
		if (!page)
			goto out_uncharge_cgroup;
		if (!avoid_reserve && vma_has_reserves(vma, gbl_chg)) {
			SetPagePrivate(page);
			h->resv_huge_pages--;
		}
		spin_lock(&hugetlb_lock);
		list_move(&page->lru, &h->hugepage_activelist);
		/* Fall through */
	}
	hugetlb_cgroup_commit_charge(idx, pages_per_huge_page(h), h_cg, page);
	spin_unlock(&hugetlb_lock);

	set_page_private(page, (unsigned long)spool);

	map_commit = vma_commit_reservation(h, vma, addr);
	if (unlikely(map_chg > map_commit)) {
		/*
		 * The page was added to the reservation map between
		 * vma_needs_reservation and vma_commit_reservation.
		 * This indicates a race with hugetlb_reserve_pages.
		 * Adjust for the subpool count incremented above AND
		 * in hugetlb_reserve_pages for the same page.  Also,
		 * the reservation count added in hugetlb_reserve_pages
		 * no longer applies.
		 */
		long rsv_adjust;

		rsv_adjust = hugepage_subpool_put_pages(spool, 1);
		hugetlb_acct_memory(h, -rsv_adjust);
	}
	return page;

out_uncharge_cgroup:
	hugetlb_cgroup_uncharge_cgroup(idx, pages_per_huge_page(h), h_cg);
out_subpool_put:
	if (map_chg || avoid_reserve)
		hugepage_subpool_put_pages(spool, 1);
	vma_end_reservation(h, vma, addr);
	return ERR_PTR(-ENOSPC);
}

/*
 * alloc_huge_page()'s wrapper which simply returns the page if allocation
 * succeeds, otherwise NULL. This function is called from new_vma_page(),
 * where no ERR_VALUE is expected to be returned.
 */
struct page *alloc_huge_page_noerr(struct vm_area_struct *vma,
				unsigned long addr, int avoid_reserve)
{
	struct page *page = alloc_huge_page(vma, addr, avoid_reserve);
	if (IS_ERR(page))
		page = NULL;
	return page;
}

int __weak alloc_bootmem_huge_page(struct hstate *h)
{
	struct huge_bootmem_page *m;
	int nr_nodes, node;

	for_each_node_mask_to_alloc(h, nr_nodes, node, &node_states[N_MEMORY]) {
		void *addr;

		addr = memblock_virt_alloc_try_nid_nopanic(
				huge_page_size(h), huge_page_size(h),
				0, BOOTMEM_ALLOC_ACCESSIBLE, node);
		if (addr) {
			/*
			 * Use the beginning of the huge page to store the
			 * huge_bootmem_page struct (until gather_bootmem
			 * puts them into the mem_map).
			 */
			m = addr;
			goto found;
		}
	}
	return 0;

found:
	BUG_ON(!IS_ALIGNED(virt_to_phys(m), huge_page_size(h)));
	/* Put them into a private list first because mem_map is not up yet */
	list_add(&m->list, &huge_boot_pages);
	m->hstate = h;
	return 1;
}

static void __init prep_compound_huge_page(struct page *page,
		unsigned int order)
{
	if (unlikely(order > (MAX_ORDER - 1)))
		prep_compound_gigantic_page(page, order);
	else
		prep_compound_page(page, order);
}

/* Put bootmem huge pages into the standard lists after mem_map is up */
static void __init gather_bootmem_prealloc(void)
{
	struct huge_bootmem_page *m;

	list_for_each_entry(m, &huge_boot_pages, list) {
		struct hstate *h = m->hstate;
		struct page *page;

#ifdef CONFIG_HIGHMEM
		page = pfn_to_page(m->phys >> PAGE_SHIFT);
		memblock_free_late(__pa(m),
				   sizeof(struct huge_bootmem_page));
#else
		page = virt_to_page(m);
#endif
		WARN_ON(page_count(page) != 1);
		prep_compound_huge_page(page, h->order);
		WARN_ON(PageReserved(page));
		prep_new_huge_page(h, page, page_to_nid(page));
		/*
		 * If we had gigantic hugepages allocated at boot time, we need
		 * to restore the 'stolen' pages to totalram_pages in order to
		 * fix confusing memory reports from free(1) and another
		 * side-effects, like CommitLimit going negative.
		 */
		if (hstate_is_gigantic(h))
			adjust_managed_page_count(page, 1 << h->order);
	}
}

static void __init hugetlb_hstate_alloc_pages(struct hstate *h)
{
	unsigned long i;

	for (i = 0; i < h->max_huge_pages; ++i) {
		if (hstate_is_gigantic(h)) {
			if (!alloc_bootmem_huge_page(h))
				break;
		} else if (!alloc_fresh_huge_page(h,
					 &node_states[N_MEMORY]))
			break;
	}
	h->max_huge_pages = i;
}

static void __init hugetlb_init_hstates(void)
{
	struct hstate *h;

	for_each_hstate(h) {
		if (minimum_order > huge_page_order(h))
			minimum_order = huge_page_order(h);

		/* oversize hugepages were init'ed in early boot */
		if (!hstate_is_gigantic(h))
			hugetlb_hstate_alloc_pages(h);
	}
	VM_BUG_ON(minimum_order == UINT_MAX);
}

static char * __init memfmt(char *buf, unsigned long n)
{
	if (n >= (1UL << 30))
		sprintf(buf, "%lu GB", n >> 30);
	else if (n >= (1UL << 20))
		sprintf(buf, "%lu MB", n >> 20);
	else
		sprintf(buf, "%lu KB", n >> 10);
	return buf;
}

static void __init report_hugepages(void)
{
	struct hstate *h;

	for_each_hstate(h) {
		char buf[32];
		pr_info("HugeTLB registered %s page size, pre-allocated %ld pages\n",
			memfmt(buf, huge_page_size(h)),
			h->free_huge_pages);
	}
}

#ifdef CONFIG_HIGHMEM
static void try_to_free_low(struct hstate *h, unsigned long count,
						nodemask_t *nodes_allowed)
{
	int i;

	if (hstate_is_gigantic(h))
		return;

	for_each_node_mask(i, *nodes_allowed) {
		struct page *page, *next;
		struct list_head *freel = &h->hugepage_freelists[i];
		list_for_each_entry_safe(page, next, freel, lru) {
			if (count >= h->nr_huge_pages)
				return;
			if (PageHighMem(page))
				continue;
			list_del(&page->lru);
			update_and_free_page(h, page);
			h->free_huge_pages--;
			h->free_huge_pages_node[page_to_nid(page)]--;
		}
	}
}
#else
static inline void try_to_free_low(struct hstate *h, unsigned long count,
						nodemask_t *nodes_allowed)
{
}
#endif

/*
 * Increment or decrement surplus_huge_pages.  Keep node-specific counters
 * balanced by operating on them in a round-robin fashion.
 * Returns 1 if an adjustment was made.
 */
static int adjust_pool_surplus(struct hstate *h, nodemask_t *nodes_allowed,
				int delta)
{
	int nr_nodes, node;

	VM_BUG_ON(delta != -1 && delta != 1);

	if (delta < 0) {
		for_each_node_mask_to_alloc(h, nr_nodes, node, nodes_allowed) {
			if (h->surplus_huge_pages_node[node])
				goto found;
		}
	} else {
		for_each_node_mask_to_free(h, nr_nodes, node, nodes_allowed) {
			if (h->surplus_huge_pages_node[node] <
					h->nr_huge_pages_node[node])
				goto found;
		}
	}
	return 0;

found:
	h->surplus_huge_pages += delta;
	h->surplus_huge_pages_node[node] += delta;
	return 1;
}

#define persistent_huge_pages(h) (h->nr_huge_pages - h->surplus_huge_pages)
static unsigned long set_max_huge_pages(struct hstate *h, unsigned long count,
						nodemask_t *nodes_allowed)
{
	unsigned long min_count, ret;

	if (hstate_is_gigantic(h) && !gigantic_page_supported())
		return h->max_huge_pages;

	/*
	 * Increase the pool size
	 * First take pages out of surplus state.  Then make up the
	 * remaining difference by allocating fresh huge pages.
	 *
	 * We might race with __alloc_buddy_huge_page() here and be unable
	 * to convert a surplus huge page to a normal huge page. That is
	 * not critical, though, it just means the overall size of the
	 * pool might be one hugepage larger than it needs to be, but
	 * within all the constraints specified by the sysctls.
	 */
	spin_lock(&hugetlb_lock);
	while (h->surplus_huge_pages && count > persistent_huge_pages(h)) {
		if (!adjust_pool_surplus(h, nodes_allowed, -1))
			break;
	}

	while (count > persistent_huge_pages(h)) {
		/*
		 * If this allocation races such that we no longer need the
		 * page, free_huge_page will handle it by freeing the page
		 * and reducing the surplus.
		 */
		spin_unlock(&hugetlb_lock);

		/* yield cpu to avoid soft lockup */
		cond_resched();

		if (hstate_is_gigantic(h))
			ret = alloc_fresh_gigantic_page(h, nodes_allowed);
		else
			ret = alloc_fresh_huge_page(h, nodes_allowed);
		spin_lock(&hugetlb_lock);
		if (!ret)
			goto out;

		/* Bail for signals. Probably ctrl-c from user */
		if (signal_pending(current))
			goto out;
	}

	/*
	 * Decrease the pool size
	 * First return free pages to the buddy allocator (being careful
	 * to keep enough around to satisfy reservations).  Then place
	 * pages into surplus state as needed so the pool will shrink
	 * to the desired size as pages become free.
	 *
	 * By placing pages into the surplus state independent of the
	 * overcommit value, we are allowing the surplus pool size to
	 * exceed overcommit. There are few sane options here. Since
	 * __alloc_buddy_huge_page() is checking the global counter,
	 * though, we'll note that we're not allowed to exceed surplus
	 * and won't grow the pool anywhere else. Not until one of the
	 * sysctls are changed, or the surplus pages go out of use.
	 */
	min_count = h->resv_huge_pages + h->nr_huge_pages - h->free_huge_pages;
	min_count = max(count, min_count);
	try_to_free_low(h, min_count, nodes_allowed);
	while (min_count < persistent_huge_pages(h)) {
		if (!free_pool_huge_page(h, nodes_allowed, 0))
			break;
		cond_resched_lock(&hugetlb_lock);
	}
	while (count < persistent_huge_pages(h)) {
		if (!adjust_pool_surplus(h, nodes_allowed, 1))
			break;
	}
out:
	ret = persistent_huge_pages(h);
	spin_unlock(&hugetlb_lock);
	return ret;
}

#define HSTATE_ATTR_RO(_name) \
	static struct kobj_attribute _name##_attr = __ATTR_RO(_name)

#define HSTATE_ATTR(_name) \
	static struct kobj_attribute _name##_attr = \
		__ATTR(_name, 0644, _name##_show, _name##_store)

static struct kobject *hugepages_kobj;
static struct kobject *hstate_kobjs[HUGE_MAX_HSTATE];

static struct hstate *kobj_to_node_hstate(struct kobject *kobj, int *nidp);

static struct hstate *kobj_to_hstate(struct kobject *kobj, int *nidp)
{
	int i;

	for (i = 0; i < HUGE_MAX_HSTATE; i++)
		if (hstate_kobjs[i] == kobj) {
			if (nidp)
				*nidp = NUMA_NO_NODE;
			return &hstates[i];
		}

	return kobj_to_node_hstate(kobj, nidp);
}

static ssize_t nr_hugepages_show_common(struct kobject *kobj,
					struct kobj_attribute *attr, char *buf)
{
	struct hstate *h;
	unsigned long nr_huge_pages;
	int nid;

	h = kobj_to_hstate(kobj, &nid);
	if (nid == NUMA_NO_NODE)
		nr_huge_pages = h->nr_huge_pages;
	else
		nr_huge_pages = h->nr_huge_pages_node[nid];

	return sprintf(buf, "%lu\n", nr_huge_pages);
}

static ssize_t __nr_hugepages_store_common(bool obey_mempolicy,
					   struct hstate *h, int nid,
					   unsigned long count, size_t len)
{
	int err;
	NODEMASK_ALLOC(nodemask_t, nodes_allowed, GFP_KERNEL | __GFP_NORETRY);

	if (hstate_is_gigantic(h) && !gigantic_page_supported()) {
		err = -EINVAL;
		goto out;
	}

	if (nid == NUMA_NO_NODE) {
		/*
		 * global hstate attribute
		 */
		if (!(obey_mempolicy &&
				init_nodemask_of_mempolicy(nodes_allowed))) {
			NODEMASK_FREE(nodes_allowed);
			nodes_allowed = &node_states[N_MEMORY];
		}
	} else if (nodes_allowed) {
		/*
		 * per node hstate attribute: adjust count to global,
		 * but restrict alloc/free to the specified node.
		 */
		count += h->nr_huge_pages - h->nr_huge_pages_node[nid];
		init_nodemask_of_node(nodes_allowed, nid);
	} else
		nodes_allowed = &node_states[N_MEMORY];

	h->max_huge_pages = set_max_huge_pages(h, count, nodes_allowed);

	if (nodes_allowed != &node_states[N_MEMORY])
		NODEMASK_FREE(nodes_allowed);

	return len;
out:
	NODEMASK_FREE(nodes_allowed);
	return err;
}

static ssize_t nr_hugepages_store_common(bool obey_mempolicy,
					 struct kobject *kobj, const char *buf,
					 size_t len)
{
	struct hstate *h;
	unsigned long count;
	int nid;
	int err;

	err = kstrtoul(buf, 10, &count);
	if (err)
		return err;

	h = kobj_to_hstate(kobj, &nid);
	return __nr_hugepages_store_common(obey_mempolicy, h, nid, count, len);
}

static ssize_t nr_hugepages_show(struct kobject *kobj,
				       struct kobj_attribute *attr, char *buf)
{
	return nr_hugepages_show_common(kobj, attr, buf);
}

static ssize_t nr_hugepages_store(struct kobject *kobj,
	       struct kobj_attribute *attr, const char *buf, size_t len)
{
	return nr_hugepages_store_common(false, kobj, buf, len);
}
HSTATE_ATTR(nr_hugepages);

#ifdef CONFIG_NUMA

/*
 * hstate attribute for optionally mempolicy-based constraint on persistent
 * huge page alloc/free.
 */
static ssize_t nr_hugepages_mempolicy_show(struct kobject *kobj,
				       struct kobj_attribute *attr, char *buf)
{
	return nr_hugepages_show_common(kobj, attr, buf);
}

static ssize_t nr_hugepages_mempolicy_store(struct kobject *kobj,
	       struct kobj_attribute *attr, const char *buf, size_t len)
{
	return nr_hugepages_store_common(true, kobj, buf, len);
}
HSTATE_ATTR(nr_hugepages_mempolicy);
#endif


static ssize_t nr_overcommit_hugepages_show(struct kobject *kobj,
					struct kobj_attribute *attr, char *buf)
{
	struct hstate *h = kobj_to_hstate(kobj, NULL);
	return sprintf(buf, "%lu\n", h->nr_overcommit_huge_pages);
}